Package cc.mallet.fst
Class CRFOptimizableByGradientValues
- java.lang.Object
-
- cc.mallet.fst.CRFOptimizableByGradientValues
-
- All Implemented Interfaces:
Optimizable,Optimizable.ByGradientValue
public class CRFOptimizableByGradientValues extends java.lang.Object implements Optimizable.ByGradientValue
A CRF objective function that is the sum of multiple objective functions that implement Optimizable.ByGradientValue.- Author:
- Gregory Druck, Gaurav Chandalia
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cc.mallet.optimize.Optimizable
Optimizable.ByBatchGradient, Optimizable.ByCombiningBatchGradient, Optimizable.ByGISUpdate, Optimizable.ByGradient, Optimizable.ByGradientValue, Optimizable.ByHessian, Optimizable.ByValue, Optimizable.ByVotedPerceptron
-
-
Constructor Summary
Constructors Constructor Description CRFOptimizableByGradientValues(CRF crf, Optimizable.ByGradientValue[] opts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetNumParameters()doublegetParameter(int index)voidgetParameters(double[] buffer)doublegetValue()Returns the log probability of the training sequence labels and the prior over parameters.voidgetValueGradient(double[] buffer)voidsetParameter(int index, double value)voidsetParameters(double[] buff)
-
-
-
Constructor Detail
-
CRFOptimizableByGradientValues
public CRFOptimizableByGradientValues(CRF crf, Optimizable.ByGradientValue[] opts)
- Parameters:
crf- CRF whose parameters we wish to estimate.opts- Optimizable.ByGradientValue objective functions. Parameters are estimated by maximizing the sum of the individual objective functions.
-
-
Method Detail
-
getNumParameters
public int getNumParameters()
- Specified by:
getNumParametersin interfaceOptimizable
-
getParameters
public void getParameters(double[] buffer)
- Specified by:
getParametersin interfaceOptimizable
-
getParameter
public double getParameter(int index)
- Specified by:
getParameterin interfaceOptimizable
-
setParameters
public void setParameters(double[] buff)
- Specified by:
setParametersin interfaceOptimizable
-
setParameter
public void setParameter(int index, double value)- Specified by:
setParameterin interfaceOptimizable
-
getValue
public double getValue()
Returns the log probability of the training sequence labels and the prior over parameters.- Specified by:
getValuein interfaceOptimizable.ByGradientValue
-
getValueGradient
public void getValueGradient(double[] buffer)
- Specified by:
getValueGradientin interfaceOptimizable.ByGradientValue
-
-