ca.pfv.spmf.algorithms.classifiers.decisiontree.id3
Class DecisionTree
- java.lang.Object
-
- ca.pfv.spmf.algorithms.classifiers.decisiontree.id3.DecisionTree
-
public class DecisionTree extends java.lang.ObjectThis class represents a decision tree created by the ID3 algorithm.- See Also:
AlgoID3,Node,DecisionNode,ClassNode
-
-
Constructor Summary
Constructors Constructor and Description DecisionTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringpredictTargetAttributeValue(java.lang.String[] newInstance)This method predict the class of an instance.voidprint()Print the tree to System.out.
-
-
-
Method Detail
-
print
public void print()
Print the tree to System.out.
-
predictTargetAttributeValue
public java.lang.String predictTargetAttributeValue(java.lang.String[] newInstance)
This method predict the class of an instance.- Parameters:
newInstance- an instance for which to perform the prediction.- Returns:
- Return the class name or null if the tree cannot predict the class, for example because some value does not appear in the tree.
-
-
DMelt 3.0 © DataMelt by jWork.ORG