Class ParallelNegLogLikelihood
java.lang.Object
opennlp.tools.ml.maxent.quasinewton.NegLogLikelihood
opennlp.tools.ml.maxent.quasinewton.ParallelNegLogLikelihood
- All Implemented Interfaces:
- Function
Evaluates 
negative log-likelihood and
 its gradient in parallel.- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondouble[]gradientAt(double[] x) Computes the gradient forx.doublevalueAt(double[] x) Computes the function value forx.Methods inherited from class opennlp.tools.ml.maxent.quasinewton.NegLogLikelihoodgetDimension, getInitialPoint
- 
Constructor Details- 
ParallelNegLogLikelihood- Parameters:
- indexer- The- DataIndexerto use as input provider.
- threads- The number of thread to compute with in parallel. Must be greater than- 0.
- Throws:
- IllegalArgumentException- Thrown if parameters were invalid.
 
 
- 
- 
Method Details- 
valueAtpublic double valueAt(double[] x) Computes the function value forx.- Specified by:
- valueAtin interface- Function
- Overrides:
- valueAtin class- NegLogLikelihood
- Parameters:
- x- The input.
- Returns:
- Returns the computed negative log-likelihood.
- Throws:
- IllegalArgumentException- Thrown if parameters were invalid.
 
- 
gradientAtpublic double[] gradientAt(double[] x) Computes the gradient forx.- Specified by:
- gradientAtin interface- Function
- Overrides:
- gradientAtin class- NegLogLikelihood
- Parameters:
- x- The input.
- Returns:
- Returns the computed gradient.
- Throws:
- IllegalArgumentException- Thrown if parameters were invalid.
 
 
-