Klasse DoccatCrossValidator

java.lang.Object
opennlp.tools.doccat.DoccatCrossValidator

public class DoccatCrossValidator extends Object
Cross validator for DocumentCategorizer.
  • Konstruktordetails

  • Methodendetails

    • evaluate

      public void evaluate(ObjectStream<DocumentSample> samples, int nFolds) throws IOException
      Starts the evaluation.
      Parameter:
      samples - The ObjectStream of samples to train and test with.
      nFolds - Number of folds. It must be greater than zero.
      Löst aus:
      IOException - Thrown if IO errors occurred.
    • getDocumentAccuracy

      public double getDocumentAccuracy()
      Gibt zurück:
      Retrieves the accuracy for all iterations.
    • getDocumentCount

      public long getDocumentCount()
      Gibt zurück:
      Retrieves the number of words which where validated over all iterations. The result is the amount of folds multiplied by the total number of words.