Probabilistic Pairwise Measures - MetricsReloaded.metrics.prob_pairwise_measures

This module provides classes for calculating probabilistic pairwise measures.

Calculating multi-threshold/probabilistic pairwise measures

class MetricsReloaded.metrics.prob_pairwise_measures.ProbabilityPairwiseMeasures(pred_proba, ref_proba, case=None, measures=[], empty=False, dict_args={})[source]
positive_predictive_values_thr(thresh)[source]

PPV given a specified threshold

Returns:

PPV at specified threshold

specificity_thr(thresh)[source]

Specificity given a specified threshold

Returns:

Specificity at specified threshold

sensitivity_thr(thresh)[source]

Sensitivity given a specified threshold

Returns:

Sensitivity at specified threshold

net_benefit_treated()[source]

Calculation of net benefit given a specified threshold

auroc()[source]
Calculation of AUROC using trapezoidal integration based

on the threshold and values list obtained from the all_multi_threshold_values method

James A Hanley and Barbara J McNeil. 1982. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology 143, 1 (1982), 29–36.

Returns:

AUC

froc()[source]

Calculation of FROC score

Bram Van Ginneken, Samuel G Armato III, Bartjan de Hoop, Saskia van Amelsvoort-van de Vorst, Thomas Duindam, Meindert Niemeijer, Keelin Murphy, Arnold Schilham, Alessandra Retico, Maria Evelina Fantacci, et al. 2010. Comparing and combining algorithms for computer-aided detection of pulmonary nodules in computed tomography scans: the ANODE09 study. Medical image analysis 14, 6 (2010), 707–722.

average_precision()[source]

Average precision calculation using trapezoidal integration. This integrates the precision as function of recall curve

Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. 2014. Microsoft coco: Common objects in context. In European conference on computer vision. Springer, 740–755.

Returns:

AP

sensitivity_at_specificity()[source]

From specificity cut-off values in the value_specificity field of the dictionary of arguments dict_args, reading of the maximum sensitivity value for all specificities larger than the specified value. If value not specified, calculated at specificity of 0.8

Returns:

sensitivity at specificity threshold

specificity_at_sensitivity()[source]

Specificity given specified sensitivity (Field value_sensitivity) in the arguments dictionary. If not specified, calculated at sensitivity=0.8

Returns:

specificity at sensitivity threshold

fppi_at_sensitivity()[source]

FPPI value at specified sensitivity value (Field value_sensitivity) in the arguments’ dictionary. If not specified, calculated at sensitivity 0.8

Returns:

fppi at sensitivity threshold

sensitivity_at_fppi()[source]

Sensitivity at specified value of FPPI (Field value_fppi) in the argument’s dictionary. If not specified calculated at FPPI=0.8

Returns:

sensitivity at fppi threshold

sensitivity_at_ppv()[source]

Sensitivity at specified PPV (field value_ppv) in the arguments’ dictionary. If not specified, calculated at value 0.8

Returns:

sensitivity at PPV threshold

ppv_at_sensitivity()[source]

PPV at specified sensitivity value (Field value_sensitivity) in the argument’s dictionary. If not specified, calculated at value 0.8

Returns:

PPV at sensitivity threshold

to_dict_meas(fmt='{:.4f}')[source]

Transforming the results to form a dictionary