Klasse ParallelNegLogLikelihood
java.lang.Object
opennlp.tools.ml.maxent.quasinewton.NegLogLikelihood
opennlp.tools.ml.maxent.quasinewton.ParallelNegLogLikelihood
- Alle implementierten Schnittstellen:
Function
Evaluate negative log-likelihood and its gradient in parallel
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdouble[]
gradientAt
(double[] x) Computes the gradient.double
valueAt
(double[] x) Computes the negative log-likelihood.Von Klasse geerbte Methoden opennlp.tools.ml.maxent.quasinewton.NegLogLikelihood
getDimension, getInitialPoint
-
Konstruktordetails
-
ParallelNegLogLikelihood
- Parameter:
indexer
- TheDataIndexer
to use as input provider.threads
- The number of thread to compute with in parallel. Must be greater than0
.- 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 SchnittstelleFunction
- Setzt außer Kraft:
valueAt
in KlasseNegLogLikelihood
- 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 SchnittstelleFunction
- Setzt außer Kraft:
gradientAt
in KlasseNegLogLikelihood
- Parameter:
x
- The input.- Gibt zurück:
- Returns the computed gradient.
- Löst aus:
IllegalArgumentException
- Thrown if parameters were invalid.
-