From 6c203f207caec82e7e67fe42e204b03d00a9ea91 Mon Sep 17 00:00:00 2001 From: Charles Dickens Date: Fri, 15 Sep 2023 11:32:42 -0700 Subject: [PATCH] Update GradientDescent.java --- .../application/learning/weight/gradient/GradientDescent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psl-core/src/main/java/org/linqs/psl/application/learning/weight/gradient/GradientDescent.java b/psl-core/src/main/java/org/linqs/psl/application/learning/weight/gradient/GradientDescent.java index 6978eea83..3c2d1199b 100644 --- a/psl-core/src/main/java/org/linqs/psl/application/learning/weight/gradient/GradientDescent.java +++ b/psl-core/src/main/java/org/linqs/psl/application/learning/weight/gradient/GradientDescent.java @@ -551,7 +551,7 @@ protected void runValidationEvaluation(int epoch) { evaluation.compute(validationMap); currentValidationEvaluationMetric = evaluation.getNormalizedRepMetric(); - if (currentValidationEvaluationMetric > bestValidationEvaluationMetric) { + if (MathUtils.compare(currentValidationEvaluationMetric, bestValidationEvaluationMetric) >= 0) { lastValidationImprovementEpoch = epoch; bestValidationEvaluationMetric = currentValidationEvaluationMetric;