Skip to content

Instantly share code, notes, and snippets.

@aravindpai
Last active December 6, 2022 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aravindpai/cd4534811b57a67ab6b9dece3cbd9b96 to your computer and use it in GitHub Desktop.
Save aravindpai/cd4534811b57a67ab6b9dece3cbd9b96 to your computer and use it in GitHub Desktop.
from sklearn.model_selection import train_test_split
x_tr,x_val,y_tr,y_val = train_test_split(features,labels, test_size=0.2, stratify=labels,random_state=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment