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

keep only < 273 for both icing and no-icing regions

parent cfbc4e7b
No related branches found
No related tags found
No related merge requests found
...@@ -1241,3 +1241,14 @@ def split_data(num_obs, perc=0.2, skip=1): ...@@ -1241,3 +1241,14 @@ def split_data(num_obs, perc=0.2, skip=1):
np.random.shuffle(train_idxs) np.random.shuffle(train_idxs)
return train_idxs[::skip], test_idxs[::skip] return train_idxs[::skip], test_idxs[::skip]
def test(filename):
h5f = h5py.File(filename, 'r')
time = h5f['time']
intsty = h5f['icing_intensity']
trn_idxs, tst_idxs = split_data(time.shape[0])
print(np.histogram(intsty[trn_idxs], bins=7))
print(np.histogram(intsty[tst_idxs], bins=7))
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