Expand description
Accuracy of a model’s predictions against observations.
The errors are eᵢ = observedᵢ − predictedᵢ (positive when the model
predicts too little), from a regression’s fitted values, a forecast, or any
other model.
§Examples
use u_analytics::accuracy::prediction_errors;
let observed = [10.0, 12.0, 11.0, 13.0];
let predicted = [10.5, 11.5, 11.0, 12.0];
let e = prediction_errors(&observed, &predicted, 0).unwrap();
assert!((e.mean_error - 0.25).abs() < 1e-12);
assert!((e.mean_absolute_error - 0.5).abs() < 1e-12);Structs§
- Prediction
Errors - Error measures of predictions against observations.
Functions§
- prediction_
errors - Error measures of
predictedagainstobserved.