calculate_rmse#
- cinnabar.stats.calculate_rmse(y_true: ndarray, y_pred: ndarray) float[source]#
Compute root mean squared error between true and predicted values.
Note
The RMSE is calculated as:
\[RMSE = \sqrt{\frac{1}{N} \sum_{i=1}^N (y_i - \hat{y}_i)^2}\]where \(y_i\) is the predicted value and \(\hat{y}_i\) is the true value.
- Parameters:
y_true (ndarray with shape (N,)) – True values
y_pred (ndarray with shape (N,)) – Predicted values
- Returns:
rmse – RMSE between true and predicted values
- Return type:
float