Statistics
Root mean squared error
stats.rmseAlso called root mean squared error, rmse, root mean square error, rms error
Square root of the mean squared error, in the units of the data.
Notation
observed values
y ∈ ℝn
predicted values
ŷ ∈ ℝn
number of observations
Size, at least 1
Result: the root mean squared error
scalar
Worked examples
Each result is solved exactly and confirmed by two independent computations.
Given
Result
≈ 1.29099444874
Given
Result
≈ 3.53553390593
Given
Result
≈ 0.25
Common mistakes
Returns the mean squared error
The square root is missing.
Fix: Take the square root of the mean.
Square root of the sum
The squared errors are summed, not averaged, before the root; the result is sqrt(n) times too large.
Fix: Divide by n inside the square root.
Source
Murphy 2022
Murphy, Kevin P. Probabilistic Machine Learning: An Introduction. MIT Press, 2022.