Skip to content

Commit 0de3dcf

Browse files
Fix bug in AUCPR
The previous commit independently also solves the bug of negative aucpr. This commit makes two inequalities consistent with eachother when encountering a 0.0 probability (which should not happen anymore). Co-Authored-By: Jacob Sznajdman <[email protected]>
1 parent 4e6ca37 commit 0de3dcf

File tree

1 file changed

+1
-1
lines changed
  • alpha/alpha-algo/src/main/java/org/neo4j/gds/ml/linkmodels/metrics

1 file changed

+1
-1
lines changed

alpha/alpha-algo/src/main/java/org/neo4j/gds/ml/linkmodels/metrics/LinkMetric.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void accept(double signedProbability) {
8080
}
8181
}
8282
lastThreshold = Math.abs(signedProbability);
83-
if (signedProbability >= 0) {
83+
if (signedProbability > 0) {
8484
positivesSeen++;
8585
} else {
8686
negativesSeen++;

0 commit comments

Comments
 (0)