cc.mallet.grmm.learning
Class ACRF.MaximizableACRF
java.lang.Object
cc.mallet.grmm.learning.ACRF.MaximizableACRF
- All Implemented Interfaces:
- Optimizable, Optimizable.ByGradientValue, java.io.Serializable
- Enclosing class:
- ACRF
public class ACRF.MaximizableACRF
- extends java.lang.Object
- implements Optimizable.ByGradientValue, 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
inferencer
protected Inferencer inferencer
ACRF.MaximizableACRF
protected ACRF.MaximizableACRF(InstanceList ilist)
getNumParameters
public int getNumParameters()
- Specified by:
getNumParameters
in interface Optimizable
getParameters
public void getParameters(double[] buf)
- Specified by:
getParameters
in interface Optimizable
setParameters
public void setParameters(double[] params)
- Specified by:
setParameters
in interface Optimizable
getExpectations
public SparseVector[] getExpectations(int cnum)
getConstraints
public SparseVector[] getConstraints(int cnum)
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
getValue
public double getValue()
- Returns the log probability of the training sequence labels
- Specified by:
getValue
in interface Optimizable.ByGradientValue
computeLogLikelihood
protected double computeLogLikelihood()
getValueGradient
public void getValueGradient(double[] buf)
- Computes the graident of the penalized log likelihood
of the ACRF, and returns it in buf[].
- Specified by:
getValueGradient
in interface Optimizable.ByGradientValue
collectConstraints
public void collectConstraints(InstanceList ilist)
report
public void report()
forceStale
public void forceStale()
getTotalNodes
public int getTotalNodes()