///|
/// Records binary confusion evidence after accepting scores at a threshold.
pub struct ThresholdPoint {
  score_threshold : Double
  accepted_true_positives : Int
  accepted_false_positives : Int
  rejected_true_negatives : Int
  rejected_false_negatives : Int
  true_positive_rate_value : Double
  false_positive_rate_value : Double
  precision_value : Double
  recall_value : Double
} derive(Eq, Debug)

///|
/// Stores deterministic ROC and precision-recall analysis.
pub struct BinaryThresholdAnalysis {
  threshold_points : Array[ThresholdPoint]
  observed_positive_count : Int
  observed_negative_count : Int
  roc_area : Double
  average_precision_value : Double
} derive(Eq, Debug)