[ANN] cpm.3.0.0 will be available in OPAM soon

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
score labels )
val roc_curve: SL.t list -> (float * float) list
(
* ROC curve (list of (FPR,TPR) values) corresponding to
those score labels )
val fast_auc: SL.t list -> float
(
* compute Area Under the ROC curve given an unsorted list
of score labels )
val auc: SL.t list -> float
(
* (early) enrichment factor at given threshold (database percentage)
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 power_metric: float -> SL.t list -> float
(
* bedroc_auc at given alpha. Default alpha = 20.0. *)
val bedroc_auc: ?alpha:float -> SL.t list -> float
end

1 Like

What?! discuss.ocaml.org doesn’t automatically colorize / syntax highlight OCaml code?!

you probably need to wrap in a code block ```ocaml, like this:

let f ~x ?y () = ["hello", world] in
fun z -> f ~x:z ()

It’s pretty common markdown, similar to what github uses.

1 Like