NishantShri4 commented on code in PR #758: URL: https://github.com/apache/opennlp/pull/758#discussion_r2041237463
########## opennlp-tools/src/main/java/opennlp/tools/monitoring/PrevNIterationAccuracyLessThanTolerance.java: ########## @@ -0,0 +1,30 @@ +package opennlp.tools.monitoring; + +/** Identifies whether the difference between the training accuracy for current iteration + * and the training accuracy of previous + * n-1, n-2.. n-ith iterations is less than the defined Tolerance. + * + */ +public class PrevNIterationAccuracyLessThanTolerance implements StopCriteria { + + public static String ACCURACY_DIFF_UNDER_TOLERANCE = "Stopping: change in training set accuracy less than {%s}"; + + private final double tolerance; + + /** TODO: 24-03-2025 : i) Should a generic test method be exposed at interface level? Review Comment: Thanks. Done. Pls. refer to StopCriteria Interface. ########## opennlp-tools/src/main/java/opennlp/tools/monitoring/PrevNIterationAccuracyLessThanTolerance.java: ########## @@ -0,0 +1,30 @@ +package opennlp.tools.monitoring; + +/** Identifies whether the difference between the training accuracy for current iteration + * and the training accuracy of previous + * n-1, n-2.. n-ith iterations is less than the defined Tolerance. + * + */ +public class PrevNIterationAccuracyLessThanTolerance implements StopCriteria { + + public static String ACCURACY_DIFF_UNDER_TOLERANCE = "Stopping: change in training set accuracy less than {%s}"; + + private final double tolerance; + + /** TODO: 24-03-2025 : i) Should a generic test method be exposed at interface level? + * ii) iterationDeltaAccuracy could be a list?*/ + public boolean test (double ... iterationDeltaAccuracy) { Review Comment: Thanks. This file is removed. Instead Added IterDeltaAccuracyUnderTolerance class with its intent in the JavaDocs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org