Package de.jungblut.ner
Class ConditionalLikelihoodCostFunction
- java.lang.Object
-
- de.jungblut.ner.ConditionalLikelihoodCostFunction
-
- All Implemented Interfaces:
CostFunction
public final class ConditionalLikelihoodCostFunction extends java.lang.Object implements CostFunction
Conditional likelihood cost function, used in a maximum entropy markov model to optimize the weights.- Author:
- thomas.jungblut
-
-
Constructor Summary
Constructors Constructor Description ConditionalLikelihoodCostFunction(de.jungblut.math.DoubleMatrix features, de.jungblut.math.DoubleMatrix outcome)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CostGradientTupleevaluateCost(de.jungblut.math.DoubleVector input)Evaluation for the cost function to retrieve cost and gradient.
-
-
-
Method Detail
-
evaluateCost
public CostGradientTuple evaluateCost(de.jungblut.math.DoubleVector input)
Description copied from interface:CostFunctionEvaluation for the cost function to retrieve cost and gradient.- Specified by:
evaluateCostin interfaceCostFunction- Parameters:
input- a given input vector- Returns:
- a tuple consists of J (cost) and a vector X which is the gradient of the input.
-
-