calculate_nrmse#
- cinnabar.stats.calculate_nrmse(y_true: ndarray, y_pred: ndarray) float[source]#
Compute the normalized root mean squared error between true and predicted values, using the true mean to normalize the RMSE. [1]
Note
The NRMSE is calculated as:
\[NRMSE = \frac{RMSE}{\bar{y}}\]where \(RMSE\) is the root mean squared error between true and predicted values, and \(\bar{y}\) is the mean of the true values.
- Parameters:
y_true (ndarray with shape (N,)) – True values
y_pred (ndarray with shape (N,)) – Predicted values
- Returns:
nrmse – NRMSE between true and predicted values
- Return type:
float
References