cc.mallet.grmm.learning
Class ACRF.MaximizableACRF

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface cc.mallet.optimize.Optimizable
Optimizable.ByBatchGradient, Optimizable.ByCombiningBatchGradient, Optimizable.ByGISUpdate, Optimizable.ByGradient, Optimizable.ByGradientValue, Optimizable.ByHessian, Optimizable.ByValue, Optimizable.ByVotedPerceptron
 
Field Summary
protected  Inferencer inferencer
           
protected  java.util.BitSet infiniteValues
           
 
Constructor Summary
protected ACRF.MaximizableACRF(InstanceList ilist)
           
 
Method Summary
 void collectConstraints(InstanceList ilist)
           
protected  double computeLogLikelihood()
           
 void forceStale()
           
 SparseVector[] getConstraints(int cnum)
           
 SparseVector[] getExpectations(int cnum)
           
 int getNumParameters()
           
 double getParameter(int index)
           
 void getParameters(double[] buf)
           
 int getTotalNodes()
           
 double getValue()
          Returns the log probability of the training sequence labels
 void getValueGradient(double[] buf)
          Computes the graident of the penalized log likelihood of the ACRF, and returns it in buf[].
 void report()
           
 void setParameter(int index, double value)
           
 void setParameters(double[] params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

infiniteValues

protected java.util.BitSet infiniteValues

inferencer

protected Inferencer inferencer
Constructor Detail

ACRF.MaximizableACRF

protected ACRF.MaximizableACRF(InstanceList ilist)
Method Detail

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()