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;