Klasse NegLogLikelihood

java.lang.Object
opennlp.tools.ml.maxent.quasinewton.NegLogLikelihood
Alle implementierten Schnittstellen:
Function
Bekannte direkte Unterklassen:
ParallelNegLogLikelihood

public class NegLogLikelihood extends Object implements Function
Evaluate negative log-likelihood and its gradient from DataIndexer.
  • Konstruktordetails

    • NegLogLikelihood

      public NegLogLikelihood(DataIndexer indexer)
      Parameter:
      indexer - The DataIndexer to use as input provider.
  • Methodendetails

    • getDimension

      public int getDimension()
      Angegeben von:
      getDimension in Schnittstelle Function
      Gibt zurück:
      Retrieves the dimension value.
    • getInitialPoint

      public double[] getInitialPoint()
      Gibt zurück:
      Retrieves the initial point as double array.
    • valueAt

      public double valueAt(double[] x)
      Computes the negative log-likelihood.
      Angegeben von:
      valueAt in Schnittstelle Function
      Parameter:
      x - The input.
      Gibt zurück:
      Returns the computed negative log-likelihood.
      Löst aus:
      IllegalArgumentException - Thrown if parameters were invalid.
    • gradientAt

      public double[] gradientAt(double[] x)
      Computes the gradient.
      Angegeben von:
      gradientAt in Schnittstelle Function
      Parameter:
      x - The input.
      Gibt zurück:
      Returns the computed gradient.
      Löst aus:
      IllegalArgumentException - Thrown if parameters were invalid.