Root Mean Squared Error#
- ahrs.utils.metrics.rmse(x: ndarray, y: ndarray)#
The RMSE is computed as:
\[d(\mathbf{x}, \mathbf{y}) = \sqrt{\frac{1}{N}\sum_{i=1}^N (x_i-y_i)^2}\]where \(N\) is the number of elements in \(\mathbf{x}\) and \(\mathbf{y}\).
If \(\mathbf{x}\) and \(\mathbf{y}\) are \(M \times N\) matrices, then the RMSE is computed for each row, yielding a vector of length \(M\).
- Parameters:
x (numpy.ndarray) – First set of values to compare.
y (numpy.ndarray) – Second set of values to compare.
- Returns:
d – Root mean squared error between given values.
- Return type:
float