Created
August 6, 2020 17:46
-
-
Save ShrashtiSinghal/ded15d56fb235f96e40a3e99bb6b77d4 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
#Scale all the attributes except RAD, CHAS, ZN | |
from sklearn import preprocessing | |
min_max_scaler = preprocessing.MinMaxScaler() | |
header_new = ['CRIM', 'INDUS', 'NOX', 'RM', 'AGE','DIS','TAX', 'PTRATIO','B','LSTAT'] | |
x = data.loc[:,header_new] | |
y = data['MEDV'] | |
x = pd.DataFrame(data=min_max_scaler.fit_transform(x), columns=header_new) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment