cpm: Classification Performance Metrics library (ROC AUC, BEDROC AUC, EF, PM, etc.).

Useful for people doing classification / machine learning.

Code is there: https://github.com/UnixJunkie/cpmlib

Signature:

module type SCORE_LABEL = sig

type t

val get_score: t -> float

val get_label: t -> bool

end

module type ROC_FUNCTOR = functor (SL: SCORE_LABEL) ->

sig

(** sort score labels putting high scores first *)
val rank_order_by_score: SL.t list -> SL.t list
(** compute the cumulated actives curve given

an already sorted list of score labels

*)*

val cumulated_actives_curve: SL.t list -> int list

(* compute Area Under the ROC curve given an already sorted list of

val cumulated_actives_curve: SL.t list -> int list

(

score labels

*)*

val roc_curve: SL.t list -> (float * float) list

(* ROC curve (list of (FPR,TPR) values) corresponding to

val roc_curve: SL.t list -> (float * float) list

(

those score labels

*)*

val fast_auc: SL.t list -> float

(* compute Area Under the ROC curve given an unsorted list

val fast_auc: SL.t list -> float

(

of score labels

*)*

val auc: SL.t list -> float

(* (early) enrichment factor at given threshold (database percentage)

val auc: SL.t list -> float

(

given an unsorted list of score labels

*)*

val enrichment_factor: float -> SL.t list -> float

(* power metric at given threshold given an unsorted list of score labels

val enrichment_factor: float -> SL.t list -> float

(

*)*

val power_metric: float -> SL.t list -> float

(* bedroc_auc at given alpha. Default alpha = 20.0. *)

val power_metric: float -> SL.t list -> float

(

val bedroc_auc: ?alpha:float -> SL.t list -> float

end