DefaultTrainingProgressMonitor (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.monitoring, class: DefaultTrainingProgressMonitor

# Class DefaultTrainingProgressMonitor

java.lang.Object
opennlp.tools.monitoring.DefaultTrainingProgressMonitor

All Implemented Interfaces:
  `TrainingProgressMonitor`

public class DefaultTrainingProgressMonitor extends Object implements TrainingProgressMonitor
The default implementation of `TrainingProgressMonitor`. This publishes model training progress to the chosen logging destination.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultTrainingProgressMonitor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `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`
  `isTrainingFinished()`
  Checks whether the training has finished.

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultTrainingProgressMonitor

    public DefaultTrainingProgressMonitor()

- ## Method Details

  - ### finishedIteration

    public void finishedIteration(int iteration, int numberCorrectEvents, int totalEvents, TrainingMeasure measure, double measureValue)
    Captures the Iteration progress.
    Specified by:
      `finishedIteration` in interface `TrainingProgressMonitor`
    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 applicable `TrainingMeasure`.

  - ### finishedTraining

    public void finishedTraining(int iterations, StopCriteria<?> stopCriteria)
    Captures the training completion progress.
    Specified by:
      `finishedTraining` in interface `TrainingProgressMonitor`
    Parameters:
      `iterations` - Total number of iterations configured for the training.
      `stopCriteria` - `StopCriteria` for the training.

  - ### display

    public 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.
    Specified by:
      `display` in interface `TrainingProgressMonitor`
    Parameters:
      `clear` - Set to true to clear the recorded progress.

  - ### isTrainingFinished

    public boolean isTrainingFinished()
    Checks whether the training has finished.
    Specified by:
      `isTrainingFinished` in interface `TrainingProgressMonitor`
    Returns:
      `true` if the training has finished, `false` if the training is not yet completed.