|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.AbstractFeatureManager<java.lang.Character>
calhoun.analysis.crf.features.tricycle13.KmerFeatures
public class KmerFeatures
trains on the data and then evaluates to P(state | label) for given Kmers. Used for historical reasons. Emission markov generally does better.
| Nested Class Summary | |
|---|---|
static class |
KmerFeatures.Cardinality
|
| Constructor Summary | |
|---|---|
KmerFeatures()
|
|
KmerFeatures(KmerFeatures.Cardinality cardinality)
|
|
KmerFeatures(java.util.List<int[]> kmerDefs)
|
|
KmerFeatures(java.util.List<int[]> kmerDefs,
KmerFeatures.Cardinality cardinality)
|
|
| Method Summary | |
|---|---|
void |
evaluateNode(InputSequence<? extends java.lang.Character> seq,
int pos,
int state,
FeatureList result)
Evaluates the set of features managed by this object for the given arguments. |
java.lang.String |
getFeatureName(int featureIndex)
Returns a human identifiable name for the feature referenced by a given index. |
java.lang.String |
getKmer(InputSequence<? extends java.lang.Character> seq,
int pos,
int[] def)
|
double |
getKmerProb(int kmerIndex,
java.lang.String kmer,
int label)
Returns an individual entry from the counts list. |
int |
getNumFeatures()
Returns the number of features maintained by this FeatureManager. |
java.lang.String |
kmerName(int index)
Returns a string representation of a given kmer definition |
void |
setKmerDefinitions(java.util.List<java.util.List<java.lang.Integer>> defs)
|
void |
setRareThreshold(int threshold)
|
void |
train(int startingIndex,
ModelManager modelInfo,
java.util.List<? extends TrainingSequence<? extends java.lang.Character>> data)
Computes the P(label | kmer) for each kmer across all of the training data. |
| Methods inherited from class calhoun.analysis.crf.AbstractFeatureManager |
|---|
getCacheStrategy, 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 |
|---|
getCacheStrategy, getInputComponent, setInputComponent |
| Constructor Detail |
|---|
public KmerFeatures(KmerFeatures.Cardinality cardinality)
public KmerFeatures()
public KmerFeatures(java.util.List<int[]> kmerDefs)
public KmerFeatures(java.util.List<int[]> kmerDefs,
KmerFeatures.Cardinality cardinality)
| Method Detail |
|---|
public void setKmerDefinitions(java.util.List<java.util.List<java.lang.Integer>> defs)
public void setRareThreshold(int threshold)
public int getNumFeatures()
FeatureManagerFeatureManager. This number must be fixed after the call to trainFeatures is complete.
getNumFeatures in interface FeatureManager<java.lang.Character>FeatureManagerpublic java.lang.String getFeatureName(int featureIndex)
FeatureManager
getFeatureName in interface FeatureManager<java.lang.Character>featureIndex - the index of this feature
public void evaluateNode(InputSequence<? extends java.lang.Character> seq,
int pos,
int state,
FeatureList result)
FeatureManagerNode
evaluateNode in interface FeatureManagerNode<java.lang.Character>
public java.lang.String getKmer(InputSequence<? extends java.lang.Character> seq,
int pos,
int[] def)
public java.lang.String kmerName(int index)
public double getKmerProb(int kmerIndex,
java.lang.String kmer,
int label)
public void train(int startingIndex,
ModelManager modelInfo,
java.util.List<? extends TrainingSequence<? extends java.lang.Character>> data)
train in interface FeatureManager<java.lang.Character>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 featuredata - the full list of training sequences to use to train the feature
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||