Get startedGet started for free

Evaluate the GB regressor

Now that the test set predictions are available, you can use them to evaluate the test set Root Mean Squared Error (RMSE) of gb.

y_test and predictions y_pred are available in your workspace.

This exercise is part of the course

Machine Learning with Tree-Based Models in Python

View Course

Exercise instructions

  • Import mean_squared_error from sklearn.metrics as MSE.

  • Compute the test set MSE and assign it to mse_test.

  • Compute the test set RMSE and assign it to rmse_test.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Import mean_squared_error as MSE
____

# Compute MSE
mse_test = ____

# Compute RMSE
rmse_test = ____

# Print RMSE
print('Test set RMSE of gb: {:.3f}'.format(rmse_test))
Edit and Run Code