Created
December 25, 2019 06:21
-
-
Save vivekpadia70/aa2e19202b3a69802587647f70e14fc9 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
gbr = GradientBoostingRegressor(n_estimators=1000, max_depth=5, random_state=22) | |
gbr.fit(X_train, Y_train) | |
print("Gradient Boosting R^2 Score: ", gbr.score(X_train, Y_train)) | |
print("Gradient Boosting Test R^2 Score: ", gbr.score(X_test, Y_test)) | |
y_pred = gbr.predict(X_test) | |
print("Mean Squared Error: ", mean_squared_error(y_pred, Y_test)) | |
print("Mean Absolute Error: ", mean_absolute_error(y_pred, Y_test)) | |
print("Cross Validation Score: ", cross_val_score(gbr, X_test, Y_test, cv=5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment