Function classifier_measures::roc_auc [] [src]

pub fn roc_auc<T, X, F, I>(data: I, convert_fn: F) -> Option<X> where
    I: IntoIterator<Item = T>,
    F: Fn(T) -> (bool, X),
    X: Float

Computes the area under a ROC curve of a given classifier.

data is a free-form IntoIterator object and convert_fn is a closure that converts each data-point into a pair (ground_truth, prediction).

Returns None if one of the classes is not present or any values are non-finite. Otherwise, returns Some(area_under_curve).