Post · 1 min read· p. 309

Root Mean Squared Error

ahrs.utils.metrics.rmse(x: ndarray, y: ndarray) : The RMSE is computed as:

code
d(x,y)=1N∑i=1N(xi−yi)2d(\mathbf{x}, \mathbf{y}) = \sqrt{\frac{1}{N}\sum_{i=1}^N (x_i-y_i)^2}
where NN is the number of elements in x\mathbf{x} and y\mathbf{y}. If x\mathbf{x} and y\mathbf{y} are M×NM \times N matrices, then the RMSE is computed for each row, yielding a vector of length MM. 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