1actual = [0, 1, 2, 0, 3]
2predicted = [0.1, 1.3, 2.1, 0.5, 3.1]
3
4mse = sklearn.metrics.mean_squared_error(actual, predicted)
5
6rmse = math.sqrt(mse)
7
8print(rmse)
1from sklearn.metrics import mean_squared_error
2from math import sqrt
3
4rms = sqrt(mean_squared_error(y_actual, y_predicted))
5
1def rmse(predictions, targets):
2 return np.sqrt(((predictions - targets) ** 2).mean())