Untitled

 avatar
unknown
plain_text
3 years ago
610 B
23
Indexable
#Split dataset into train and test
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(
                                                                          X,
                                                                          y,
                                                                          test_size=0.25,
                                                                          random_state=1,
                                                                          shuffle=True

)
print(X_train.shape, y_train.shape)
Editor is loading...