Class QNModel

java.lang.Object
opennlp.tools.ml.model.AbstractModel
opennlp.tools.ml.maxent.quasinewton.QNModel
All Implemented Interfaces:
opennlp.tools.ml.model.MaxentModel

public class QNModel extends opennlp.tools.ml.model.AbstractModel
A maximum entropy model which has been trained via the L-BFGS algorithm , which belongs to the group of Quasi Newton (QN) algorithms.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    QNModel(opennlp.tools.ml.model.Context[] params, String[] predLabels, String[] outcomeNames)
    Initializes a QNModel with the specified parameters, predicate/feature labels, and outcome names.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    eval(String[] context)
    double[]
    eval(String[] context, double[] probs)
    double[]
    eval(String[] context, float[] values)
    int

    Methods inherited from class opennlp.tools.ml.model.AbstractModel

    equals, getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getOutcome, hashCode

    Methods inherited from class Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QNModel

      public QNModel(opennlp.tools.ml.model.Context[] params, String[] predLabels, String[] outcomeNames)
      Initializes a QNModel with the specified parameters, predicate/feature labels, and outcome names.
      Parameters:
      params - The parameters of the model.
      predLabels - The names of the predicates used in this model.
      outcomeNames - The names of the outcomes this model predicts.
  • Method Details

    • getNumOutcomes

      public int getNumOutcomes()
      Specified by:
      getNumOutcomes in interface opennlp.tools.ml.model.MaxentModel
      Overrides:
      getNumOutcomes in class opennlp.tools.ml.model.AbstractModel
    • eval

      public double[] eval(String[] context)
    • eval

      public double[] eval(String[] context, double[] probs)
    • eval

      public double[] eval(String[] context, float[] values)