public class LogLikelihoodDifferentiableFunction extends AbstractDifferentiableFunction<GraphicalModel>
Generates (potentially noisy, no promises about exactness) gradients from a batch of examples that were provided to the system.
|Modifier and Type||Field and Description|
|Constructor and Description|
|Modifier and Type||Method and Description|
Gets a summary of the log-likelihood of a singe model at a point
public static final java.lang.String VARIABLE_TRAINING_VALUE
public double getSummaryForInstance(GraphicalModel model, ConcatVector weights, ConcatVector gradient)
It assumes that the models have observations for training set as metadata in LogLikelihoodDifferentiableFunction.OBSERVATION_FOR_TRAINING. The models can also have observations fixed in CliqueTree.VARIABLE_OBSERVED_VALUE, but these will be considered fixed and will not be learned against.
model- the model to find the log-likelihood of
weights- the weights to use
gradient- the gradient to use, will be updated by accumulating the gradient from this instance
Stanford NLP Group