12345678910111213141516171819202122232425262728293031323334353637383940 |
- import threshold_xarray as th
- import xarray as xr
- import numpy as np
- import torch
- import os
- import sklearn.calibration as cal
- if __name__ == '__main__':
- print('Loading Config..B')
- config = th.load_config()
- ENSEMBLE_PATH = f"{config['paths']['model_output']}{config['ensemble']['name']}"
- V4_PATH = ENSEMBLE_PATH + '/v4'
- if not os.path.exists(V4_PATH):
- os.makedirs(V4_PATH)
- print('Config Loaded')
-
- print('Loading Predictions...')
- val_preds = xr.open_dataset(f'{ENSEMBLE_PATH}/val_predictions.nc')
- test_preds = xr.open_dataset(f'{ENSEMBLE_PATH}/test_predictions.nc')
- print('Predictions Loaded')
-
-
-
-
- print('Calculating Statistics...')
- val_stats = th.compute_ensemble_statistics(val_preds)
- test_stats = th.compute_ensemble_statistics(test_preds)
-
- print('Calibrating Test Set...')
-
|