Last active
July 25, 2021 15:30
-
-
Save nphausg/926dc192b3a80b5b74b7099c3f39800b to your computer and use it in GitHub Desktop.
random_state[sklearn].py
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
| >>> x_train, x_test, y_train, y_test = train_test_split( | |
| ... x, y, test_size=4, random_state=4 | |
| ... ) | |
| >>> x_train | |
| array([[17, 18], | |
| [ 5, 6], | |
| [23, 24], | |
| [ 1, 2], | |
| [ 3, 4], | |
| [11, 12], | |
| [15, 16], | |
| [21, 22]]) | |
| >>> x_test | |
| array([[ 7, 8], | |
| [ 9, 10], | |
| [13, 14], | |
| [19, 20]]) | |
| >>> y_train | |
| array([1, 1, 0, 0, 1, 0, 1, 1]) | |
| >>> y_test | |
| array([0, 1, 0, 0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment