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

snapshot...

parent 2ba2abeb
Branches
No related tags found
No related merge requests found
......@@ -1308,7 +1308,7 @@ def run_mean_std_2(check_cloudy=False, no_icing_to_icing_ratio=5, params=train_p
# return mean_std_dct
def split_data(num_obs, perc=0.2, skip=1, shuffle=True):
def split_data(num_obs, perc=0.2, skip=1, shuffle=True, seed=None):
idxs = np.arange(num_obs)
idxs = list(idxs)
......@@ -1323,6 +1323,9 @@ def split_data(num_obs, perc=0.2, skip=1, shuffle=True):
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment