Class NegLogLikelihood
java.lang.Object
opennlp.tools.ml.maxent.quasinewton.NegLogLikelihood
- All Implemented Interfaces:
- Function
- Direct Known Subclasses:
- ParallelNegLogLikelihood
Evaluates negative log-likelihood and its gradient from 
DataIndexer.- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintdouble[]double[]gradientAt(double[] x) Computes the gradient.doublevalueAt(double[] x) Computes the negative log-likelihood.
- 
Constructor Details- 
NegLogLikelihood- Parameters:
- indexer- The- DataIndexerto use as input provider.
 
 
- 
- 
Method Details- 
getDimensionpublic int getDimension()- Specified by:
- getDimensionin interface- Function
- Returns:
- Retrieves the dimension value.
 
- 
getInitialPointpublic double[] getInitialPoint()- Returns:
- Retrieves the initial point as doublearray.
 
- 
valueAtpublic double valueAt(double[] x) Computes the negative log-likelihood.- Specified by:
- valueAtin interface- Function
- 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.- Specified by:
- gradientAtin interface- Function
- Parameters:
- x- The input.
- Returns:
- Returns the computed gradient.
- Throws:
- IllegalArgumentException- Thrown if parameters were invalid.
 
 
-