fn hinge_loss(scores: &[(f64, bool)], ham_weight: f64) -> f64
The mean weighted squared hinge loss of scores (lower is better).