Created
December 25, 2019 06:30
-
-
Save vivekpadia70/aeeb6ff7aa606296febbc98c6dd1a9b0 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
params = {'n_estimators':[500, 1000, 1500, 2000], 'max_depth':[3, 5, 8]} | |
gbr = GradientBoostingRegressor() | |
gbr_grid = GridSearchCV(gbr, params, cv=5) | |
gbr_grid.fit(X_train, Y_train) | |
print("Grid Search Gradient Boosting Score: ", gbr_grid.score(X_train, Y_train)) | |
print("Grid Search Gradient Boosting Test Score: ", gbr_grid.score(X_test, Y_test)) | |
print("Grid Search Gradient Boosting Best Parameters: ", gbr_grid.best_params_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment