Skip to content

Instantly share code, notes, and snippets.

@risenW
Created July 14, 2020 08:33
Show Gist options
  • Save risenW/cd7dcde3f7a321003692729b2f2a589f to your computer and use it in GitHub Desktop.
Save risenW/cd7dcde3f7a321003692729b2f2a589f to your computer and use it in GitHub Desktop.
from sklearn.model_selection import train_test_split
Xtrain, Xtest = train_test_split(ratings_df, test_size=0.2, random_state=1)
print(f"Shape of train data: {Xtrain.shape}")
print(f"Shape of test data: {Xtest.shape}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment