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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
getNumParameters
public int getNumParameters()
- Specified by:
getNumParameters
in interface Optimizable
getParameters
public void getParameters(double[] buffer)
- Specified by:
getParameters
in interface Optimizable
getParameter
public double getParameter(int index)
- Specified by:
getParameter
in interface Optimizable
setParameters
public void setParameters(double[] buff)
- Specified by:
setParameters
in interface Optimizable
setParameter
public void setParameter(int index,
double value)
- Specified by:
setParameter
in interface Optimizable
getValue
public double getValue()
- Returns the log probability of the training sequence labels and the prior over parameters.
- Specified by:
getValue
in interface Optimizable.ByGradientValue
getValueGradient
public void getValueGradient(double[] buffer)
- Specified by:
getValueGradient
in interface Optimizable.ByGradientValue