cc.mallet.fst.semi_supervised.pr
Class CRFOptimizableByKL
java.lang.Object
cc.mallet.fst.semi_supervised.pr.CRFOptimizableByKL
- All Implemented Interfaces:
- Optimizable, Optimizable.ByGradientValue, java.io.Serializable
public class CRFOptimizableByKL
- extends java.lang.Object
- implements java.io.Serializable, Optimizable.ByGradientValue
M-step/M-projection for PR.
- Author:
- Kedar Bellare, Gregory Druck
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cachedValueWeightsStamp
protected int cachedValueWeightsStamp
cachedGradientWeightsStamp
protected int cachedGradientWeightsStamp
numParameters
protected int numParameters
numThreads
protected int numThreads
weight
protected double weight
gaussianPriorVariance
protected double gaussianPriorVariance
cachedValue
protected double cachedValue
cachedGradient
protected double[] cachedGradient
initialProbList
protected java.util.List<double[]> initialProbList
finalProbList
protected java.util.List<double[]> finalProbList
transitionProbList
protected java.util.List<double[][][]> transitionProbList
trainingSet
protected InstanceList trainingSet
crf
protected CRF crf
constraints
protected CRF.Factors constraints
expectations
protected CRF.Factors expectations
executor
protected java.util.concurrent.ThreadPoolExecutor executor
auxModel
protected PRAuxiliaryModel auxModel
CRFOptimizableByKL
public CRFOptimizableByKL(CRF crf,
InstanceList trainingSet,
PRAuxiliaryModel auxModel,
double[][][][] cachedDots,
int numThreads,
double weight)
gatherConstraints
protected void gatherConstraints(PRAuxiliaryModel auxModel,
double[][][][] cachedDots)
getExpectationValue
protected double 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
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
setGaussianPriorVariance
public void setGaussianPriorVariance(double value)
shutdown
public void shutdown()