Created
April 8, 2020 21:47
-
-
Save smazzanti/5ba50020f2d21022b9b0442f5c173190 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
from sklearn.model_selection import train_test_split | |
# make X and y | |
np.random.seed(0) | |
X = pd.DataFrame(np.random.normal(size = (20_000, len(feature_names))), columns = feature_names) | |
y = X2y(X, with_error = True) | |
# make X_trn, X_tst, y_trn, y_tst | |
X_trn, X_tst, y_trn, y_tst = train_test_split(X, y, test_size = .5, random_state = 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment