cc.mallet.grmm.learning
Class ACRF.SequenceTemplate

java.lang.Object
  extended by cc.mallet.grmm.learning.ACRF.Template
      extended by cc.mallet.grmm.learning.ACRF.SequenceTemplate
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ACRF.BigramTemplate, ACRF.PairwiseFactorTemplate, ACRF.UnigramTemplate, CrossTemplate1, SimilarTokensTemplate
Enclosing class:
ACRF

public abstract static class ACRF.SequenceTemplate
extends ACRF.Template

Abstract class for Templates that expect a (FeatureVectorSequence, LabelsSequence) for their instances.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cc.mallet.grmm.learning.ACRF.Template
index, weights
 
Constructor Summary
ACRF.SequenceTemplate()
           
 
Method Summary
protected abstract  void addInstantiatedCliques(ACRF.UnrolledGraph graph, FeatureVectorSequence fvs, LabelsAssignment lblseq)
          Adds all instiated cliques for an instance.
 void addInstantiatedCliques(ACRF.UnrolledGraph graph, Instance instance)
          Adds all instiated cliques for an instance.
 
Methods inherited from class cc.mallet.grmm.learning.ACRF.Template
addSomeUnsupportedWeights, computeAssignment, computeFactor, createFactorMatrix, getAssignmentsPresent, getDefaultWeight, getDefaultWeights, getWeights, initWeights, isSupportedOnly, isTrainable, isUnsupportedWeightsAdded, modifyPotential, setDefaultWeight, setDefaultWeights, setTrainable, setWeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACRF.SequenceTemplate

public ACRF.SequenceTemplate()
Method Detail

addInstantiatedCliques

protected abstract void addInstantiatedCliques(ACRF.UnrolledGraph graph,
                                               FeatureVectorSequence fvs,
                                               LabelsAssignment lblseq)
Adds all instiated cliques for an instance. This method is called as a graph is being unrolled for an instance.

Parameters:
graph - The graph that the cliques will be added to.
fvs - The input features of the instance to unroll the cliques for.
lblseq - The label sequence of the instance being unrolled.

addInstantiatedCliques

public void addInstantiatedCliques(ACRF.UnrolledGraph graph,
                                   Instance instance)
Description copied from class: ACRF.Template
Adds all instiated cliques for an instance. This method is called as a graph is being unrolled for an instance.

Specified by:
addInstantiatedCliques in class ACRF.Template
Parameters:
graph - The graph that the cliques will be added to.
instance - Instance to unroll grpah for. Subclasses are free to specify what types they expect in the Instance's slots.