TrainingProgressMonitor (Apache OpenNLP :: API 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.monitoring, interface: TrainingProgressMonitor

Package opennlp.tools.monitoring

# Interface TrainingProgressMonitor

public interface TrainingProgressMonitor
An interface to capture training progress of a model.

- ## 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.

- ## 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 applicable `TrainingMeasure`.

  - ### finishedTraining

    void finishedTraining(int iterations, StopCriteria<?> stopCriteria)
    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.