Skip to content

Commit 907aa49

Browse files
Carole SudreCarole Sudre
authored andcommitted
Adding references to pairwise_measures
1 parent b3a3715 commit 907aa49

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

MetricsReloaded/metrics/pairwise_measures.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ def youden_index(self):
429429
430430
YI = Specificity + Sensitivity - 1
431431
432+
Youden, W.J, Index for rating diagnostic tests - 1950 Cancer 3 - 32,35
433+
432434
:return: Youden index
433435
"""
434436
return self.specificity() + self.sensitivity() - 1
@@ -441,6 +443,8 @@ def sensitivity(self):
441443
442444
Sens = \dfrac{TP}{\sharp Ref}
443445
446+
Yerushalmy J., Statistical Problems in assessing Methods of Medical Diagnosis with Special reference to X-Ray Techniques, 1947, Public Health Reports, pp1432-1449
447+
444448
This measure is not defined for empty reference. Will raise a warning and return a nan value
445449
446450
:return: sensitivity
@@ -458,6 +462,8 @@ def specificity(self):
458462
459463
Spec = \dfrac{TN}{\sharp {1-Ref}}
460464
465+
Yerushalmy J., Statistical Problems in assessing Methods of Medical Diagnosis with Special reference to X-Ray Techniques, 1947, Public Health Reports, pp1432-1449
466+
461467
This measure is not defined when there is no reference negative. This will
462468
raise a warning and return a nan
463469
@@ -503,6 +509,8 @@ def false_positive_rate(self):
503509
504510
FPR = \dfrac{FP}{\sharp \bar{Ref}}
505511
512+
Burke D, Brundage J, Redfield R., Measurement of the False positive rate in a screening Program for Human Immunodeficiency Virus Infections - 1988 - The New England Journal of Medicine 319 (15) 961-964
513+
506514
:return: false positive rate
507515
"""
508516
return self.fp() / self.n_neg_ref()
@@ -542,6 +550,8 @@ def matthews_correlation_coefficient(self):
542550
"""
543551
Calculates and returns the MCC for the binary case
544552
553+
Matthews, B.W. Comparison of the predicted and observed secondary structure of T4 phage lysozyme. Biochimica et Biophysica Acta - Protein Structure - 1975 405 442-451
554+
545555
.. math::
546556
547557
MCC = \dfrac{TP * TN - FP * FN}{(TP+FP)*(TP+FN)*(TN+FP)*(TN+FN)}
@@ -586,6 +596,8 @@ def cohens_kappa(self):
586596
587597
:math:`p_e = ` expected chance matching and :math:`p_o = `observed accuracy
588598
599+
Cohen, J. A coefficient of agreement for nominal scales - Educational and Psychological Measurement (1960) 20 37-46
600+
589601
:return: CK
590602
"""
591603
p_e = self.expected_matching_ck()
@@ -634,6 +646,8 @@ def positive_predictive_values(self):
634646
Not defined when no positives in the prediction - returns nan if both
635647
reference and prediction empty. Returns 0 if only prediction empty
636648
649+
Fletcher, R.H and Fletcher S.W (2005) - Clinical Epidemiology, the essentials p45
650+
637651
:return: PPV
638652
"""
639653
if self.flag_empty_pred:
@@ -755,6 +769,8 @@ def negative_predictive_values(self):
755769
This function calculates the negative predictive value ratio between
756770
the number of true negatives and the total number of negative elements
757771
772+
Fletcher, R.H and Fletcher S.W (2005) - Clinical Epidemiology, the essentials p45
773+
758774
:return: NPV
759775
"""
760776
if self.tn() + self.fn() == 0:
@@ -791,6 +807,10 @@ def fppi(self):
791807
"""
792808
This function returns the average number of false positives per
793809
image, assuming that the cases are collated on the last axis of the array
810+
811+
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. Comparing and combining algorithms for computer-aided detection of pulmonary nodules in computed tomography scans: the anode09 study. Medical image analysis, 14(6):707–722, 2010.
812+
Andriy I Bandos, Howard E Rockette, Tao Song, and David Gur. Area under the free-response roc curve (froc) and a related summary index. Biometrics, 65(1):247–256, 2009.
813+
794814
"""
795815
sum_per_image = np.sum(
796816
np.reshape(self.__fp_map(), -1, self.ref.shape[-1]), axis=0
@@ -802,6 +822,8 @@ def intersection_over_reference(self):
802822
This function calculates the ratio of the intersection of prediction and
803823
reference over reference.
804824
825+
Pavel Matula, Martin Maška, Dmitry V Sorokin, Petr Matula, Carlos Ortiz-de Solórzano, and Michal Kozubek. Cell tracking accuracy measurement based on comparison of acyclic oriented graphs. PloS one, 10(12):e0144959, 2015.
826+
805827
:return: IoR
806828
"""
807829
if self.flag_empty_ref:
@@ -815,6 +837,8 @@ def intersection_over_union(self):
815837
reference over union - This is also the definition of
816838
jaccard coefficient
817839
840+
Murphy, A.H. The Finley Affair: a signal event in the history of forecast verification - Weather and Forecasting (1996) 11
841+
818842
:return: IoU
819843
"""
820844
if self.flag_empty_pred and self.flag_empty_ref:
@@ -1094,13 +1118,16 @@ def measured_distance(self):
10941118

10951119
def measured_average_distance(self):
10961120
"""
1097-
This function returns only the average distance when calculating the
1121+
This function returns only the average symmetric surface distance when calculating the
10981122
distances between prediction and reference
10991123
11001124
.. math::
11011125
11021126
ASSD(A,B) = \dfrac{\sum_{a\inA}d(a,B) + \sum_{b\inB}d(b,A)}{|A|+ |B|}
11031127
1128+
Heimann, T., et al. (2009), Comparison and evaluation of methods for liver segmentation from CT datasets. IEEE Trans Med Imaging. 28(8): p. 1251-65.
1129+
Varduhi Yeghiazaryan and Irina Voiculescu. An overview of current evaluation methods used in medical image segmentation. Department of Computer Science, University of Oxford, 2015.
1130+
11041131
:return: assd
11051132
"""
11061133
return self.measured_distance()[1]

0 commit comments

Comments
 (0)