cc.mallet.grmm.learning
Class PseudolikelihoodACRFTrainer.Maxable
java.lang.Object
cc.mallet.grmm.util.CachingOptimizable.ByGradient
cc.mallet.grmm.learning.PseudolikelihoodACRFTrainer.Maxable
- All Implemented Interfaces:
- Optimizable, Optimizable.ByGradientValue, java.io.Serializable
- Enclosing class:
- PseudolikelihoodACRFTrainer
public class PseudolikelihoodACRFTrainer.Maxable
- extends CachingOptimizable.ByGradient
- implements java.io.Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
infiniteValues
protected java.util.BitSet infiniteValues
PseudolikelihoodACRFTrainer.Maxable
protected PseudolikelihoodACRFTrainer.Maxable(ACRF acrf,
InstanceList ilist)
getGaussianPriorVariance
public double getGaussianPriorVariance()
setGaussianPriorVariance
public void setGaussianPriorVariance(double gaussianPriorVariance)
getNumParameters
public int getNumParameters()
- Specified by:
getNumParameters
in interface Optimizable
getParameters
public void getParameters(double[] buf)
- Specified by:
getParameters
in interface Optimizable
setParametersInternal
protected void setParametersInternal(double[] params)
getExpectations
public SparseVector[] getExpectations(int cnum)
getConstraints
public SparseVector[] getConstraints(int cnum)
printParameters
public void printParameters()
- print weights
computeValue
protected double computeValue()
- Specified by:
computeValue
in class CachingOptimizable.ByGradient
computeValueGradient
protected void computeValueGradient(double[] grad)
- Computes the gradient of the penalized log likelihood of the
ACRF, and places it in cachedGradient[].
Gradient is
constraint - expectation - parameters/gaussianPriorVariance
- Specified by:
computeValueGradient
in class CachingOptimizable.ByGradient
collectConstraints
public void collectConstraints(InstanceList ilist)