Skip to content

Instantly share code, notes, and snippets.

@gabrielziegler3
Created February 17, 2019 16:21
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 gabrielziegler3/88e3ab0072f3b6bf940b35a4ac159a13 to your computer and use it in GitHub Desktop.
Save gabrielziegler3/88e3ab0072f3b6bf940b35a4ac159a13 to your computer and use it in GitHub Desktop.
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42, stratify=y)
dtrain = xgb.DMatrix(data=X_train, label=y_train)
dtest = xgb.DMatrix(data=X_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment