|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.msu.cme.rdp.classifier.rrnaclassifier.Classifier
public class Classifier
This is the class to do the classification.
Field Summary | |
---|---|
private float[] |
accumulateProbArr
|
private int |
MAX_NUM_OF_WORDS
The assumed maximum number of words per sequence. |
static int |
MIN_GOOD_WORDS
|
static int |
MIN_SEQ_LEN
The minimum number of bases per sequence. |
private int |
NUM_OF_RUNS
The number of bootstrap trials. |
private float[][] |
querySeq_wordProbArr
|
private TrainingInfo |
trainingInfo
|
Constructor Summary | |
---|---|
Classifier(TrainingInfo t)
Creates new Classifier. |
Method Summary | |
---|---|
private void |
addBestGenusNode(HierarchyTree node,
java.util.List resultList)
Adds a single RankAssignment to the list of the classification results if a treenode is already included in the list, simply increases the confidence for that RankAssignment by 1, for easy calculation. |
(package private) void |
addConfidence(HierarchyTree node,
java.util.HashMap map)
increase the count of the RankAssignment in the map if match that node or any ancestor of that node. |
ClassificationResult |
classify(Sequence pSeq)
Takes a query sequence, returns the classification result. |
private void |
findAncestor(HierarchyTree root,
RankAssignment curNode,
java.util.List ancestorList)
Finds the ancestors of the given node up to the root. |
private java.util.List |
getFinalResultList(java.util.HashMap map,
HierarchyTree aNode)
|
private java.util.List |
getGreedyPath(HierarchyTree root,
java.util.List resultList)
Returns a list of RankAssignment in which root is the first item. |
private int |
getRandomIndex(int maxi)
Generates a random integer in the range of 0 to the specified maximum integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TrainingInfo trainingInfo
private final int NUM_OF_RUNS
private final int MAX_NUM_OF_WORDS
public static final int MIN_SEQ_LEN
public static final int MIN_GOOD_WORDS
private float[][] querySeq_wordProbArr
private float[] accumulateProbArr
Constructor Detail |
---|
Classifier(TrainingInfo t)
Method Detail |
---|
public ClassificationResult classify(Sequence pSeq)
ShortSequenceException
- if the sequence length is less than the minimum sequence length.void addConfidence(HierarchyTree node, java.util.HashMap map)
node
- map
- private java.util.List getFinalResultList(java.util.HashMap map, HierarchyTree aNode)
private void addBestGenusNode(HierarchyTree node, java.util.List resultList)
private void findAncestor(HierarchyTree root, RankAssignment curNode, java.util.List ancestorList)
private java.util.List getGreedyPath(HierarchyTree root, java.util.List resultList)
private int getRandomIndex(int maxi)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |