class MaxentGradientDescent extends GradientDescentOptimizer implements MaxentOptimizerInterface
Implement a gradient descent algorithm that maximizes the conditional log likelihood of the training data.
See page 24 - 28 of http://nlp.stanford.edu/pubs/maxent-tutorial-slides.pdf
Methods
__construct($precision = 0.001, $step = 0.1, $maxiter = -1) | from GradientDescentOptimizer | |
array |
optimize(array $feature_array)
This function receives an array that contains an array for each document which contains an array of feature identifiers for each class and at the special key '__label__' the actual class of the training document. |
from GradientDescentOptimizer |
reportProgress($itercount) | from GradientDescentOptimizer |
Details
in GradientDescentOptimizer at line 22
public
__construct($precision = 0.001, $step = 0.1, $maxiter = -1)
in GradientDescentOptimizer at line 65
public array
optimize(array $feature_array)
This function receives an array that contains an array for each document which contains an array of feature identifiers for each class and at the special key '__label__' the actual class of the training document.
As a result it contains all the information needed to train a
set of weights with any target. Ex.: If we were training a maxent
model we would try to maximize the CLogLik that can be calculated
from this array.