calhoun.analysis.crf.features.tricycle13
Class FelsensteinFeatures

java.lang.Object
  extended by calhoun.analysis.crf.AbstractFeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
      extended by calhoun.analysis.crf.features.tricycle13.FelsensteinFeatures
All Implemented Interfaces:
FeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>, FeatureManagerNode<MultipleAlignmentInputSequence.MultipleAlignmentColumn>, java.io.Serializable

public class FelsensteinFeatures
extends AbstractFeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
implements FeatureManagerNode<MultipleAlignmentInputSequence.MultipleAlignmentColumn>

See Also:
Serialized Form

Constructor Summary
FelsensteinFeatures()
           
FelsensteinFeatures(java.util.List<int[]> clusters)
           
FelsensteinFeatures(java.util.List<int[]> clusters, java.util.List<int[]> eModelNum)
           
FelsensteinFeatures(java.util.List<int[]> clusters, java.util.List<int[]> eModelNum, java.util.List<int[]> flags)
           
 
Method Summary
 void evaluateNode(InputSequence<? extends MultipleAlignmentInputSequence.MultipleAlignmentColumn> seq, int pos, int state, FeatureList result)
          Evaluates the set of features managed by this object for the given arguments.
 CacheStrategySpec getCacheStrategy()
          caching strategy that the CacheProcessor should use to cache values for this feature.
 java.lang.String getFeatureName(int featureIndex)
          Returns a human identifiable name for the feature referenced by a given index.
 int getNumFeatures()
          Returns the number of features maintained by this FeatureManager.
 void setClusters(java.util.List<java.util.List<BeanModel.Node>> clusters)
           
 void train(int startingIndex, ModelManager modelInfo, java.util.List<? extends TrainingSequence<? extends MultipleAlignmentInputSequence.MultipleAlignmentColumn>> data)
          Provides access to the entire training set so that FeatureManager can compute global properties and assign feature indices.
 
Methods inherited from class calhoun.analysis.crf.AbstractFeatureManager
getInputComponent, setInputComponent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface calhoun.analysis.crf.FeatureManager
getInputComponent, setInputComponent
 

Constructor Detail

FelsensteinFeatures

public FelsensteinFeatures(java.util.List<int[]> clusters)
                    throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

FelsensteinFeatures

public FelsensteinFeatures()

FelsensteinFeatures

public FelsensteinFeatures(java.util.List<int[]> clusters,
                           java.util.List<int[]> eModelNum)

FelsensteinFeatures

public FelsensteinFeatures(java.util.List<int[]> clusters,
                           java.util.List<int[]> eModelNum,
                           java.util.List<int[]> flags)
Method Detail

setClusters

public void setClusters(java.util.List<java.util.List<BeanModel.Node>> clusters)

getNumFeatures

public int getNumFeatures()
Description copied from interface: FeatureManager
Returns the number of features maintained by this FeatureManager. This number must be fixed after the call to trainFeatures is complete.

Specified by:
getNumFeatures in interface FeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
Returns:
number of features managed by this FeatureManager

getFeatureName

public java.lang.String getFeatureName(int featureIndex)
Description copied from interface: FeatureManager
Returns a human identifiable name for the feature referenced by a given index. Used for display purposes only.

Specified by:
getFeatureName in interface FeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
Parameters:
featureIndex - the index of this feature
Returns:
the human readable name of this feature

evaluateNode

public void evaluateNode(InputSequence<? extends MultipleAlignmentInputSequence.MultipleAlignmentColumn> seq,
                         int pos,
                         int state,
                         FeatureList result)
Description copied from interface: FeatureManagerNode
Evaluates the set of features managed by this object for the given arguments.

Specified by:
evaluateNode in interface FeatureManagerNode<MultipleAlignmentInputSequence.MultipleAlignmentColumn>

train

public void train(int startingIndex,
                  ModelManager modelInfo,
                  java.util.List<? extends TrainingSequence<? extends MultipleAlignmentInputSequence.MultipleAlignmentColumn>> data)
Description copied from interface: FeatureManager
Provides access to the entire training set so that FeatureManager can compute global properties and assign feature indices. This will be called before any evaluations are requested. If the FeatureManager can have a variable number of features, this must be fixed within this method.

Specified by:
train in interface FeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
Parameters:
startingIndex - the feature index of the first feature owned by this FeatureManager. Each FeatureManager must use up consecutive indexes, so the last index used will be startingIndex + numFeatures - 1.
modelInfo - the model that contains this feature
data - the full list of training sequences to use to train the feature

getCacheStrategy

public CacheStrategySpec getCacheStrategy()
Description copied from interface: FeatureManager
caching strategy that the CacheProcessor should use to cache values for this feature. This is only a hint, the cache processor is not required to use this (or any) caching strategy. This base class defaults to the UNSPECIFIED cache strategy.

Specified by:
getCacheStrategy in interface FeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
Overrides:
getCacheStrategy in class AbstractFeatureManager<MultipleAlignmentInputSequence.MultipleAlignmentColumn>
Returns:
cache strategy specification appropriate for this feature.