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

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

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