cc.mallet.fst.semi_supervised
Class CRFOptimizableByEntropyRegularization
java.lang.Object
cc.mallet.fst.semi_supervised.CRFOptimizableByEntropyRegularization
- All Implemented Interfaces:
- Optimizable, Optimizable.ByGradientValue, java.io.Serializable
public class CRFOptimizableByEntropyRegularization
- extends java.lang.Object
- implements Optimizable.ByGradientValue, java.io.Serializable
A CRF objective function that is the entropy of the CRF's
predictions on unlabeled data.
References:
Feng Jiao, Shaojun Wang, Chi-Hoon Lee, Russell Greiner, Dale Schuurmans
"Semi-supervised conditional random fields for improved sequence segmentation and labeling"
ACL 2006
Gideon Mann, Andrew McCallum
"Efficient Computation of Entropy Gradient for Semi-Supervised Conditional Random Fields"
HLT/NAACL 2007
- Author:
- Gaurav Chandalia, Gregory Druck
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expectations
protected CRF.Factors expectations
incrementor
protected Transducer.Incrementor incrementor
data
protected InstanceList data
crf
protected CRF crf
scalingFactor
protected double scalingFactor
cachedValue
protected double cachedValue
cachedGradient
protected double[] cachedGradient
CRFOptimizableByEntropyRegularization
public CRFOptimizableByEntropyRegularization(CRF crf,
InstanceList ilist,
double scalingFactor)
- Initializes the structures.
CRFOptimizableByEntropyRegularization
public CRFOptimizableByEntropyRegularization(CRF crf,
InstanceList ilist)
- Initializes the structures (sets the scaling factor to 1.0).
getScalingFactor
public double getScalingFactor()
setScalingFactor
public void setScalingFactor(double scalingFactor)
computeExpectations
public void computeExpectations()
- Resets, computes and fills expectations from all instances, also updating
the entropy value.
Analogous to CRFOptimizableByLabelLikelihood.getExpectationValue.
getValue
public double getValue()
- Specified by:
getValue
in interface Optimizable.ByGradientValue
getValueGradient
public void getValueGradient(double[] buffer)
- Specified by:
getValueGradient
in interface Optimizable.ByGradientValue
getNumParameters
public int getNumParameters()
- Specified by:
getNumParameters
in interface Optimizable
getParameters
public void getParameters(double[] buffer)
- Specified by:
getParameters
in interface Optimizable
setParameters
public void setParameters(double[] buffer)
- Specified by:
setParameters
in interface Optimizable
getParameter
public double getParameter(int index)
- Specified by:
getParameter
in interface Optimizable
setParameter
public void setParameter(int index,
double value)
- Specified by:
setParameter
in interface Optimizable