cc.mallet.grmm.learning
Class ACRF.FixedFactorTemplate

java.lang.Object
  extended by cc.mallet.grmm.learning.ACRF.Template
      extended by cc.mallet.grmm.learning.ACRF.FixedFactorTemplate
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
ACRF

public abstract static class ACRF.FixedFactorTemplate
extends ACRF.Template

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cc.mallet.grmm.learning.ACRF.Template
index, weights
 
Constructor Summary
ACRF.FixedFactorTemplate()
           
 
Method Summary
abstract  AbstractTableFactor computeFactor(ACRF.UnrolledVarSet clique)
           
 SparseVector getDefaultWeights()
           
 SparseVector[] getWeights()
          Returns the weights for this clique template.
 int initWeights(InstanceList training)
          Initializes the weight vectors to the appropriate size for a set of training data.
 boolean isTrainable()
           
 void setTrainable(boolean tr)
           
 
Methods inherited from class cc.mallet.grmm.learning.ACRF.Template
addInstantiatedCliques, addSomeUnsupportedWeights, computeAssignment, createFactorMatrix, getAssignmentsPresent, getDefaultWeight, isSupportedOnly, isUnsupportedWeightsAdded, modifyPotential, setDefaultWeight, setDefaultWeights, setWeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACRF.FixedFactorTemplate

public ACRF.FixedFactorTemplate()
Method Detail

initWeights

public int initWeights(InstanceList training)
Description copied from class: ACRF.Template
Initializes the weight vectors to the appropriate size for a set of training data.

Overrides:
initWeights in class ACRF.Template
Returns:
Number of weights created.

getWeights

public SparseVector[] getWeights()
Description copied from class: ACRF.Template
Returns the weights for this clique template. Each possible assignment to the clique can in general have a different set of weights ,so this method returns an array of SparseVectors w, where w[i] are the weights for assignment i.

Overrides:
getWeights in class ACRF.Template

getDefaultWeights

public SparseVector getDefaultWeights()
Overrides:
getDefaultWeights in class ACRF.Template

isTrainable

public boolean isTrainable()
Overrides:
isTrainable in class ACRF.Template

setTrainable

public void setTrainable(boolean tr)
Overrides:
setTrainable in class ACRF.Template

computeFactor

public abstract AbstractTableFactor computeFactor(ACRF.UnrolledVarSet clique)
Overrides:
computeFactor in class ACRF.Template