Last active
October 9, 2019 08:17
-
-
Save VictorSaenger/46475d6ba5edf20a0dcf293e0e6c7b9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # split into shuffled folds: | |
| #Note that you should edit the class array accordingly: Bias (classes_Bias) or Outlet (classes_All) | |
| sss = StratifiedShuffleSplit(n_splits=1, test_size=0.33) # chose one split to make analysis faster. change it if required | |
| for t, te in sss.split(eAll,classes_All): | |
| # Scale the data with StandardScaler before splitting: | |
| X_train, X_test = scaler.fit_transform(eAll)[t], \ | |
| scaler.fit_transform(eAll)[te] | |
| y_train, y_test = classes_All[t]-1,classes_All[te]-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment