Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active April 11, 2020 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/f6d185178f58c78336d2b8a1a6e65dde to your computer and use it in GitHub Desktop.
Save aniruddha27/f6d185178f58c78336d2b8a1a6e65dde to your computer and use it in GitHub Desktop.
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
# generate two class dataset
X, y = make_classification(n_samples=1000, n_classes=2, n_features=20, random_state=27)
# split into train-test sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment