edu.cmu.minorthird.classify.algorithms.trees
Class CompactDecisionTree
java.lang.Object
edu.cmu.minorthird.classify.BinaryClassifier
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CompactDecisionTree
public CompactDecisionTree()
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