Calculating Root Mean Squared Error (RMSE) with Sklearn and Python

Python

To calculate the RMSE in using Python and Sklearn we can use the mean_squared_error function and simply set the squared parameter to False.

 1|  from sklearn.metrics import mean_squared_error
 2|  
 3|  rmse = mean_squared_error(y_test, y_pred, squared = False)
Did you find this snippet useful?

Sign up for free to to add this to your code library