Class Classifier


  • public class Classifier
    extends java.lang.Object
    This is the class to do the classification.
    • Method Detail

      • getTrainRank

        public java.lang.String getTrainRank()
      • classify

        public ClassificationResult classify​(edu.msu.cme.rdp.readseq.readers.Sequence seq)
                                      throws java.io.IOException
        Takes a query sequence, returns the classification result. For each query sequence, first assign it to a genus node using all the words for calculation. Then randomly chooses one-eighth of the all overlapping words in the query to calculate the joint probability. The number of times a genus was selected out of the number of bootstrap trials was used as an estimate of confidence in the assignment to that genus.
        Throws:
        ShortSequenceException - if the sequence length is less than the minimum sequence length.
        java.io.IOException
      • classify

        public ClassificationResult classify​(ClassifierSequence seq,
                                             int min_bootstrap_words)
        Takes a query sequence, returns the classification result. For each query sequence, first assign it to a genus node using all the words for calculation. Then randomly chooses one-eighth of the all overlapping words in the query to calculate the joint probability. The number of times a genus was selected out of the number of bootstrap trials was used as an estimate of confidence in the assignment to that genus.
        Throws:
        ShortSequenceException - if the sequence length is less than the minimum sequence length.
      • addConfidence

        public 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.
        Parameters:
        node -
        map -