SHARE
TWEET

Untitled

a guest Apr 25th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from sklearn.model_selection import train_test_split
  2. df=df.dropna()
  3. X=df.drop(['4-year resale value'], axis=1)
  4. y=df[['4-year resale value']]
  5. X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=1)
  6.  
  7. from sklearn import preprocessing
  8. import numpy as np
  9. scaler = preprocessing.StandardScaler().fit(X_train)
  10. X_scaled=scaler.transform(X_train)
  11.  
  12. X_test_sc=scaler.transform(X_test)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top