Skip to content
Snippets Groups Projects
Commit efa053e8 authored by tomrink's avatar tomrink
Browse files

minor

parent f9e4d0a3
No related branches found
No related tags found
No related merge requests found
...@@ -1443,7 +1443,7 @@ def run_mean_std(check_cloudy=False): ...@@ -1443,7 +1443,7 @@ def run_mean_std(check_cloudy=False):
print(dname,': (', mean, mean_i, mean_ni, ') (', std, std_i, std_ni, ') ratio: ', no_icing_to_icing_ratio) print(dname,': (', mean, mean_i, mean_ni, ') (', std, std_i, std_ni, ') ratio: ', no_icing_to_icing_ratio)
print(dname,': (', lo, lo_i, lo_ni, ') (', hi, hi_i, hi_ni, ') ratio: ', no_icing_to_icing_ratio) print(dname,': (', lo, lo_i, lo_ni, ') (', hi, hi_i, hi_ni, ') ratio: ', no_icing_to_icing_ratio)
mean_std_dct[dname] = (mean_ni, std_ni, lo_ni, hi_ni) mean_std_dct[dname] = (mean, std, lo, hi)
[h5f.close() for h5f in ice_h5f_lst] [h5f.close() for h5f in ice_h5f_lst]
[h5f.close() for h5f in no_ice_h5f_lst] [h5f.close() for h5f in no_ice_h5f_lst]
...@@ -1457,7 +1457,7 @@ def run_mean_std(check_cloudy=False): ...@@ -1457,7 +1457,7 @@ def run_mean_std(check_cloudy=False):
def run_mean_std_2(check_cloudy=False, no_icing_to_icing_ratio=5, params=train_params_day): def run_mean_std_2(check_cloudy=False, no_icing_to_icing_ratio=5, params=train_params_day):
params = ['cld_height_acha', 'cld_geo_thick', 'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_press_acha', params = ['cld_height_acha', 'cld_geo_thick', 'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_press_acha',
'cld_reff_dcomp', 'cld_opd_dcomp', 'cld_cwp_dcomp', 'iwc_dcomp', 'lwc_dcomp'] 'cld_reff_dcomp', 'cld_opd_dcomp', 'cld_cwp_dcomp', 'iwc_dcomp', 'lwc_dcomp']
mean_std_dct = {} mean_std_dct = {}
...@@ -1539,30 +1539,6 @@ def run_mean_std_3(train_file_path, check_cloudy=False, params=train_params_day) ...@@ -1539,30 +1539,6 @@ def run_mean_std_3(train_file_path, check_cloudy=False, params=train_params_day)
pickle.dump(mean_std_lo_hi_dct, f) pickle.dump(mean_std_lo_hi_dct, f)
f.close() f.close()
# def split_data(num_obs, perc=0.2, skip=1, shuffle=True, seed=None):
# idxs = np.arange(num_obs)
# idxs = list(idxs)
#
# num_test = int(num_obs * perc)
#
# test_idxs = idxs[::int(num_obs / num_test)]
#
# test_set = set(test_idxs)
# train_set = (set(idxs)).difference(test_set)
# train_idxs = list(train_set)
#
# test_idxs = np.array(test_idxs)
# train_idxs = np.array(train_idxs)
#
# if seed is not None:
# np.random.seed(seed)
#
# if shuffle:
# np.random.shuffle(test_idxs)
# np.random.shuffle(train_idxs)
#
# return train_idxs[::skip], test_idxs[::skip]
def split_data(times): def split_data(times):
time_idxs = np.arange(times.shape[0]) time_idxs = np.arange(times.shape[0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment