cc.mallet.fst.semi_supervised.pr
Class ConstraintsOptimizableByPR
java.lang.Object
cc.mallet.fst.semi_supervised.pr.ConstraintsOptimizableByPR
- All Implemented Interfaces:
- Optimizable, Optimizable.ByGradientValue, java.io.Serializable
public class ConstraintsOptimizableByPR
- extends java.lang.Object
- implements java.io.Serializable, Optimizable.ByGradientValue
Optimizable for E-step/I-projection in Posterior Regularization (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 |
cacheStale
protected boolean cacheStale
numParameters
protected int numParameters
numThreads
protected int numThreads
trainingSet
protected InstanceList trainingSet
cachedValue
protected double cachedValue
cachedGradient
protected double[] cachedGradient
crf
protected CRF crf
executor
protected java.util.concurrent.ThreadPoolExecutor executor
cachedDots
protected double[][][][] cachedDots
ConstraintsOptimizableByPR
public ConstraintsOptimizableByPR(CRF crf,
InstanceList ilist,
PRAuxiliaryModel model)
ConstraintsOptimizableByPR
public ConstraintsOptimizableByPR(CRF crf,
InstanceList ilist,
PRAuxiliaryModel model,
int numThreads)
cacheDotProducts
public void cacheDotProducts()
getNumParameters
public int getNumParameters()
- Specified by:
getNumParameters
in interface Optimizable
getParameters
public void getParameters(double[] params)
- Specified by:
getParameters
in interface Optimizable
getParameter
public double getParameter(int index)
- Specified by:
getParameter
in interface Optimizable
setParameters
public void setParameters(double[] params)
- Specified by:
setParameters
in interface Optimizable
setParameter
public void setParameter(int index,
double value)
- Specified by:
setParameter
in interface Optimizable
getExpectationValue
protected double getExpectationValue()
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
getCompleteValueContribution
public double getCompleteValueContribution()
getValueGradient
public void getValueGradient(double[] buffer)
- Specified by:
getValueGradient
in interface Optimizable.ByGradientValue
shutdown
public void shutdown()
getCachedDots
public double[][][][] getCachedDots()
getAuxModel
public PRAuxiliaryModel getAuxModel()