tc
Class TCNaiveBayesResult.TCBayesCategoryListElement

java.lang.Object
  extended bytc.TCNaiveBayesResult.TCBayesCategoryListElement
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Enclosing class:
TCNaiveBayesResult

class TCNaiveBayesResult.TCBayesCategoryListElement
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

holds the scores, probabilities etc. for every category (comparable to a category ranking for every document)


Field Summary
(package private)  java.lang.String categoryLabel
          the label of the category the instance belongs to
(package private)  double probability
          the probability that the document came out of this category
 
Constructor Summary
(package private) TCNaiveBayesResult.TCBayesCategoryListElement(java.lang.String catLabel, double prob)
          the constructor for the class, sets the category label and the probability for the category represented by this element
 
Method Summary
 int compareTo(java.lang.Object arg0)
          later we want to sort the Results in order to obtain the category ranking.
 boolean equals(java.lang.Object arg0)
          The category label is the unique "index"
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

categoryLabel

java.lang.String categoryLabel
the label of the category the instance belongs to


probability

double probability
the probability that the document came out of this category

Constructor Detail

TCNaiveBayesResult.TCBayesCategoryListElement

TCNaiveBayesResult.TCBayesCategoryListElement(java.lang.String catLabel,
                                              double prob)
the constructor for the class, sets the category label and the probability for the category represented by this element

Parameters:
catLabel - the label of the category
prob - the probability that the category "created" the document
Method Detail

equals

public boolean equals(java.lang.Object arg0)
The category label is the unique "index"


compareTo

public int compareTo(java.lang.Object arg0)
later we want to sort the Results in order to obtain the category ranking. To do this, we have to define what the sort algorithm should consider as ordering over the elements. Here it's obviously the probability of the category

Specified by:
compareTo in interface java.lang.Comparable