public final class DecisionTree extends Object implements TreeBasedClassifier
Examples, builds a model by randomly choosing
subsets of features and the training set, and then finding a binary
Decision over those features and data
that produces the largest information gain in the two subsets it implies. This is repeated to build a tree
of DecisionNodes. At the bottom, leaf nodes are formed (TerminalNode) that contain a
Prediction of the target value.DecisionForest,
Serialized Form| Constructor and Description |
|---|
DecisionTree(TreeNode root) |
| Modifier and Type | Method and Description |
|---|---|
TreeNode |
findByID(String id) |
TerminalNode |
findTerminal(Example example) |
Prediction |
predict(Example test) |
String |
toString() |
void |
update(Example train)
Requests that the implementation update its internal state to reflect a new
Example. |
public DecisionTree(TreeNode root)
public Prediction predict(Example test)
predict in interface TreeBasedClassifiertest - example whose target value is to be predicatedPrediction of the target valuepublic TerminalNode findTerminal(Example example)
public void update(Example train)
TreeBasedClassifierExample.
In this case, the Example should carry a target value to learn from.update in interface TreeBasedClassifiertrain - new training exampleCopyright © 2014–2018. All rights reserved.