Skip to content

Instantly share code, notes, and snippets.

@sean-mcclure
Created November 7, 2021 22:42
Show Gist options
  • Save sean-mcclure/ca0f607e251465fe2830035e6e458dce to your computer and use it in GitHub Desktop.
Save sean-mcclure/ca0f607e251465fe2830035e6e458dce to your computer and use it in GitHub Desktop.
Loading a dataset for training
# Loading a dataset for training
data = datasets.load_breast_cancer()
# Splitting our data into train and test sets
X_train, X_test, y_train, y_test = train_test_split(data["data"],
data["target"],
test_size=0.2,
stratify=data["target"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment