edu.cmu.minorthird.classify.algorithms.trees
Class CompactDecisionTree

java.lang.Object
  extended by edu.cmu.minorthird.classify.BinaryClassifier
      extended by edu.cmu.minorthird.classify.algorithms.trees.CompactDecisionTree
All Implemented Interfaces:
Classifier, java.io.Serializable

public class CompactDecisionTree
extends BinaryClassifier
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.BinaryClassifier
classifierLearner
 
Constructor Summary
CompactDecisionTree()
           
 
Method Summary
 int addInternalNode(Feature test, double thresh, int ifTrue, int ifFalse)
           
 int addInternalNode(Feature test, int ifTrue, int ifFalse)
           
 int addLeafNode(double myScore)
           
 void compactStorage()
           
 java.lang.String explain(Instance instance)
          Return some string that 'explains' the classification
 Explanation getExplanation(Instance instance)
          Return an Explanation for the classification
 double score(Instance instance)
          Get the weight for an instance being in the positive class.
 double score(Instance instance, int index)
           
 void setRoot(int root)
           
 java.lang.String toString()
          Print routine
 void toString(java.lang.StringBuffer buf, int tab)
           
 
Methods inherited from class edu.cmu.minorthird.classify.BinaryClassifier
classification, getClassifierLearner, setClassifierLearner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompactDecisionTree

public CompactDecisionTree()
Method Detail

setRoot

public void setRoot(int root)

toString

public java.lang.String toString()
Print routine

Overrides:
toString in class java.lang.Object

toString

public void toString(java.lang.StringBuffer buf,
                     int tab)

compactStorage

public void compactStorage()

addInternalNode

public int addInternalNode(Feature test,
                           int ifTrue,
                           int ifFalse)

addInternalNode

public int addInternalNode(Feature test,
                           double thresh,
                           int ifTrue,
                           int ifFalse)

addLeafNode

public int addLeafNode(double myScore)

score

public double score(Instance instance)
Description copied from class: BinaryClassifier
Get the weight for an instance being in the positive class.

Specified by:
score in class BinaryClassifier

score

public double score(Instance instance,
                    int index)

explain

public java.lang.String explain(Instance instance)
Description copied from interface: Classifier
Return some string that 'explains' the classification

Specified by:
explain in interface Classifier

getExplanation

public Explanation getExplanation(Instance instance)
Description copied from interface: Classifier
Return an Explanation for the classification

Specified by:
getExplanation in interface Classifier