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

cumulated actives 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_roc_curve_a : SL.t array -> (float * float) array

same as roc_curve but for an already sorted array of score-labels

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

Precision Recall curve (list of (recall,precision) pairs) corresponding to given score labels

val fast_auc : SL.t list -> float

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

val auc : SL.t list -> float

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

val pr_auc : SL.t list -> float

PR AUC: Area Under the Precision-Recall curve given an unsorted list of score labels

val auc_a : SL.t array -> float

Area Under the ROC curve given an unsorted array of score labels; WARNING: array will be modified (sorted)

val fast_auc_a : SL.t array -> float

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

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

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

val fast_enrichment_factor : float -> SL.t array -> float

(early) enrichment factor at given threshold (database percentage) given an already sorted array 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 bedroc_auc_a : ?alpha:float -> ?sorted:bool -> SL.t array -> float

bedroc_auc at given alpha for an array of score-labels. Default alpha = 20.0. WARNING: the array will be modified (sorted by decrasing scores) if sorted = false which is the default.

val fast_bedroc_auc_a : ?alpha:float -> SL.t array -> float

equivalent to bedroc_auc_a ~alpha ~sorted:true arr.

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.