pub fn calibration_curve(
scores: &[f64],
labels: &[bool],
n_bins: usize,
) -> Result<Vec<CalibrationBin>, StatsError>Expand description
Bin predicted probabilities into n_bins equal-width bins over [0, 1] and
compute the observed positive frequency in each. Empty bins are omitted.
A perfectly calibrated model has every point on the y = x diagonal.
ยงErrors
StatsError::LengthMismatchifscores/labelsdiffer in length.StatsError::EmptyInputif empty orn_bins == 0.