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
params_xgb = { | |
'learning_rate': [.1, .05, ], | |
'colsample_bytree': [.3, .4, .5, .6], | |
'max_depth': [1], | |
'alpha': [3], | |
'subsample': [.5], | |
'n_estimators': [30, 70, 100, 200] | |
} | |
xgb_model = XGBRegressor() |
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 label encoder | |
from sklearn import preprocessing | |
label_encoder = preprocessing.LabelEncoder() | |
final_df['Type']= label_encoder.fit_transform(final_df['Type']) | |
final_df['City Group']= label_encoder.fit_transform(final_df['City Group']) | |
final_df.head() |