From c78dcfb2ba4486d337d597d86fe7ce582a7bb568 Mon Sep 17 00:00:00 2001 From: alirezazolanvari Date: Sun, 12 Feb 2023 23:05:36 +0100 Subject: [PATCH] fix minor bug in Hurlbert correlation #349 #350 --- pycm/pycm_distance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycm/pycm_distance.py b/pycm/pycm_distance.py index efba99c5..ae3e351b 100644 --- a/pycm/pycm_distance.py +++ b/pycm/pycm_distance.py @@ -1318,7 +1318,7 @@ def Hurlbert_calc(TP, FP, FN, TN): a_hat = ((TP + FP) * (TP + FN)) / n if (TP * TN) >= (FP * FN): g = math.ceil(a_hat) - MaxX2 = ((TP + FP) * (FP * TN) * n) / ((TP + FN) * (FN + TN)) + MaxX2 = ((TP + FP) * (FP + TN) * n) / ((TP + FN) * (FN + TN)) else: g = math.floor(a_hat) if TP <= TN: