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.
Latihan ini adalah bagian dari kursus
Machine Learning with Tree-Based Models in Python
Petunjuk latihan
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.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
# 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))