Created
June 5, 2020 08:07
-
-
Save malharb/e91492bb88dedf5b260d86c473928b6b to your computer and use it in GitHub Desktop.
Pulsar - splitting data and preprocessing
This file contains hidden or 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
from sklearn.model_selection import train_test_split | |
X = df.drop('target_class',axis=1) | |
y = df['target_class'] | |
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.3) | |
from sklearn.preprocessing import MinMaxScaler | |
scaler = MinMaxScaler() | |
scaler.fit(X_train) | |
X_train = scaler.transform(X_train) | |
X_test = scaler.transform(X_test) | |
y_train = y_train.values | |
y_test = y_test.values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment