from sklearn.metrics import mean_squared_error rms = mean_squared_error(y_actual, y_predicted, squared=False)