package cpm

  1. Overview
  2. Docs

Parameters

module SL : SCORE_LABEL

Signature

val rank_order_by_score : SL.t list -> SL.t list

sort score labels putting high scores first

val rank_order_by_score_a : SL.t array -> unit

in-place sort of score labels; putting high scores first

val cumulated_actives_curve : SL.t list -> int list

compute the cumulated actives curve given an already sorted list of score labels

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

compute Area Under the ROC curve given an already sorted list of score labels

val fast_auc : SL.t list -> float

ROC curve (list of (FPR,TPR) values) corresponding to those score labels

val auc : SL.t list -> float

compute Area Under the ROC curve given an unsorted list of score labels

val auc_a : SL.t array -> float

compute Area Under the ROC curve given an unsorted array of score labels; array will be sorted in-place

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

(early) enrichment factor at given threshold (database percentage) given an unsorted list of score labels

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

initial_enhancement a score_labels will compute S = sum_over_i (exp (-rank(active_i) / a)) given an unsorted list of score labels. Robust Initial Enhancement (RIE) = S/<S> where <S> is the average S for randomly ordered score labels. RIE = 1.0 <=> random performance. Cf. DOI:10.1021/ci0100144 for details.

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

same as initial_enhancement but does not reorder the list of score_labels

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

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

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

bedroc_auc at given alpha. Default alpha = 20.0.

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

Matthews' Correlation Coefficient (MCC) use: mcc classif_threshold score_labels. scores >= threshold are predicted as targets; scores < threshold are predicted as non targets.

val platt_scaling : ?debug:bool -> SL.t list -> float * float

a, b = platt_scaling ~debug score_labels Fit a logistic curve (1 / (1 + exp (ax + b))) to score_labels and return its (a, b) parameters. Gnuplot it used underneath to do the fitting. Biblio: Platt, J. (1999). Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in large margin classifiers, 10(3), 61-74.

val platt_probability : float -> float -> float -> float

platt_probability a b score transform score into a probability, given logistic function parameters a and b obtained from a prior call to platt_scaling.

OCaml

Innovation. Community. Security.