Package opennlp.tools.monitoring
Interface TrainingProgressMonitor
- All Known Implementing Classes:
DefaultTrainingProgressMonitor
public interface TrainingProgressMonitor
An interface to capture training progress of an
AbstractModel
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
display
(boolean clear) Displays the training progress and optionally clears the recorded progress (to save memory).void
finishedIteration
(int iteration, int numberCorrectEvents, int totalEvents, TrainingMeasure measure, double measureValue) Captures the Iteration progress.void
finishedTraining
(int iterations, StopCriteria<?> stopCriteria) Captures the training completion progress.boolean
Checks whether the training has finished.
-
Method Details
-
finishedIteration
void finishedIteration(int iteration, int numberCorrectEvents, int totalEvents, TrainingMeasure measure, double measureValue) Captures the Iteration progress.- Parameters:
iteration
- The completed iteration number.numberCorrectEvents
- Number of correctly predicted events in this iteration.totalEvents
- Total count of events processed in this iteration.measure
-TrainingMeasure
.measureValue
- measure value corresponding to the applicableTrainingMeasure
.
-
finishedTraining
Captures the training completion progress.- Parameters:
iterations
- Total number of iterations configured for the training.stopCriteria
-StopCriteria
for the training.
-
isTrainingFinished
boolean isTrainingFinished()Checks whether the training has finished.- Returns:
true
if the training has finished,false
if the training is not yet completed.
-
display
void display(boolean clear) Displays the training progress and optionally clears the recorded progress (to save memory). Callers of this method can invoke it periodically during training, to avoid holding too much progress related data in memory.- Parameters:
clear
- Set to true to clear the recorded progress.
-