Using gradient boost regression algorithm for the regressors challenge

In this section, we will see how we can use the gradient boost regression algorithm for the regressors challenge:

  1. First, we train the model using the gradient boost regression algorithm:

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

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.10.137