MulaiMulai sekarang secara gratis

Evaluate the SGB regressor

You have prepared the ground to determine the test set RMSE of sgbr which you shall evaluate in this exercise.

y_pred and y_test are available in your workspace.

Latihan ini adalah bagian dari kursus

Machine Learning with Tree-Based Models in Python

Lihat Kursus

Petunjuk latihan

  • Import mean_squared_error as MSE from sklearn.metrics.

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

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

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import mean_squared_error as MSE
____

# Compute test set MSE
mse_test = ____

# Compute test set RMSE
rmse_test = ____

# Print rmse_test
print('Test set RMSE of sgbr: {:.3f}'.format(rmse_test))
Edit dan Jalankan Kode