Skip to content

Instantly share code, notes, and snippets.

@edunuke
Created June 4, 2019 17:03
Show Gist options
  • Select an option

  • Save edunuke/7e68b1feb9d23299f28825bbbfeddf0b to your computer and use it in GitHub Desktop.

Select an option

Save edunuke/7e68b1feb9d23299f28825bbbfeddf0b to your computer and use it in GitHub Desktop.
# split dataset 80/20
traintest_split = model_selection.train_test_split(products_df.drop(TARGET_NAME,axis=1),
risk_df,
users_df,
y_class, test_size=0.2, random_state=SEED)
# Unpack the result in their individual parts
product_train, product_val, risk_train, risk_val, user_train, user_val, y_class_train, y_class_val, = traintest_split
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment