June 2020
Intermediate to advanced
382 pages
11h 39m
English
In this section, we will see how we can use the gradient boost regression algorithm for the regressors challenge:
First, we train the model using the gradient boost regression algorithm:

Once the gradient regression algorithm model is trained, we use it to predict the values:
y_pred = regressor.predict(X_test)
Finally, we calculate RMSE to quantify the performance of the model:
from sklearn.metrics import mean_squared_errorfrom math import sqrtsqrt(mean_squared_error(y_test, y_pred))
Running this will give us the output value, as follows:
Read now
Unlock full access