Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- train_ratio = 0.75
- validation_ratio = 0.15
- test_ratio = 0.10
- # train is now 75% of the entire datasets
- x_train, x_test, y_train, y_test = train_test_split(dataX, dataY, test_size=1 - train_ratio)
- # test is now 10% of the initial datasets
- # validation is now 15% of the initial datasets
- x_val, x_test, y_val, y_test = train_test_split(x_test, y_test, test_size=test_ratio/(test_ratio + validation_ratio))
- print(x_train, x_val, x_test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement