NlpTools API
Interface

NlpTools\Optimizers\MaxentOptimizerInterface

interface MaxentOptimizerInterface implements FeatureBasedLinearOptimizerInterface

Marker interface to use with the Maxent model for type checking

Methods

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 FeatureBasedLinearOptimizerInterface

Details

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.

Parameters

array $feature_array &$feature_array

Return Value

array The parameteres $l