pub fn gain_curve(
scores: &[f64],
labels: &[bool],
) -> Result<Vec<GainPoint>, StatsError>Expand description
Compute the cumulative gain / lift curve from predicted scores and true
binary labels. Points are ordered by descending score and always start at
fraction == 0, gain == 0.
ยงErrors
StatsError::LengthMismatchif the inputs differ in length.StatsError::EmptyInputif empty.StatsError::NoPositiveLabelsif there are no positives (gain undefined).