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.
Deze oefening maakt deel uit van de cursus
Machine Learning with Tree-Based Models in Python
Oefeninstructies
Import
mean_squared_errorfromsklearn.metricsasMSE.Compute the test set MSE and assign it to
mse_test.Compute the test set RMSE and assign it to
rmse_test.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# 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))