Klasse ParallelNegLogLikelihood

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

public class ParallelNegLogLikelihood extends NegLogLikelihood
Evaluate negative log-likelihood and its gradient in parallel
  • Konstruktordetails

    • ParallelNegLogLikelihood

      public ParallelNegLogLikelihood(DataIndexer indexer, int threads)
      Parameter:
      indexer - The DataIndexer to use as input provider.
      threads - The number of thread to compute with in parallel. Must be greater than 0.
      Löst aus:
      IllegalArgumentException - Thrown if parameters were invalid.
  • Methodendetails

    • valueAt

      public double valueAt(double[] x)
      Computes the negative log-likelihood.
      Angegeben von:
      valueAt in Schnittstelle Function
      Setzt außer Kraft:
      valueAt in Klasse NegLogLikelihood
      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
      Setzt außer Kraft:
      gradientAt in Klasse NegLogLikelihood
      Parameter:
      x - The input.
      Gibt zurück:
      Returns the computed gradient.
      Löst aus:
      IllegalArgumentException - Thrown if parameters were invalid.