threshold_metrics

Function threshold_metrics 

Source
pub fn threshold_metrics<S1, S2>(
    y_true: &ArrayBase<S1, Ix1>,
    y_score: &ArrayBase<S2, Ix1>,
    threshold: f64,
) -> Result<ThresholdMetrics>
where S1: Data, S2: Data, S1::Elem: Clone + Into<f64> + PartialEq, S2::Elem: Clone + Into<f64> + PartialOrd,
Expand description

Get metrics at a specific threshold

§Arguments

  • y_true - Binary true labels (0 or 1)
  • y_score - Predicted scores (probabilities)
  • threshold - Specific threshold to evaluate

§Returns

  • Result<ThresholdMetrics> - Metrics at the specified threshold