dt
Class DecisionTree
- java.lang.Object
-
- dt.DecisionTree
-
public class DecisionTree extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description DecisionTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DecisionTreeaddExample(java.util.Map<java.lang.String,java.lang.String> attributes, boolean classification)DecisionTreeaddExample(java.lang.String[] attributeValues, boolean classification)booleanapply(java.util.Map<java.lang.String,java.lang.String> data)voidcompile()AttributegetRoot()voidsetAlgorithm(Algorithm algorithm)DecisionTreesetAttributes(java.lang.String[] attributeNames)Saves the array of attribute names in an insertion ordered set.DecisionTreesetDecisions(java.lang.String attributeName, java.lang.String[] decisions)java.lang.StringtoString()
-
-
-
Method Detail
-
setAlgorithm
public void setAlgorithm(Algorithm algorithm)
-
setAttributes
public DecisionTree setAttributes(java.lang.String[] attributeNames)
Saves the array of attribute names in an insertion ordered set. The ordering of attribute names is used when addExamples is called to determine which values correspond with which names.
-
setDecisions
public DecisionTree setDecisions(java.lang.String attributeName, java.lang.String[] decisions)
-
addExample
public DecisionTree addExample(java.lang.String[] attributeValues, boolean classification) throws UnknownDecisionException
- Throws:
UnknownDecisionException
-
addExample
public DecisionTree addExample(java.util.Map<java.lang.String,java.lang.String> attributes, boolean classification) throws UnknownDecisionException
- Throws:
UnknownDecisionException
-
apply
public boolean apply(java.util.Map<java.lang.String,java.lang.String> data) throws BadDecisionException- Throws:
BadDecisionException
-
compile
public void compile()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getRoot
public Attribute getRoot()
-
-
DMelt 3.0 © DataMelt by jWork.ORG