public static class DecisionTree.Trainer extends ClassifierTrainer<double[]>
| Constructor and Description |
|---|
DecisionTree.Trainer(Attribute[] attributes,
int J)
Constructor.
|
DecisionTree.Trainer(int J)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setMaximumLeafNodes(int J)
Sets the maximum number of leaf nodes in the tree.
|
void |
setSplitRule(DecisionTree.SplitRule rule)
Sets the splitting rule.
|
DecisionTree |
train(double[][] x,
int[] y)
Learns a classifier with given training data.
|
setAttributespublic DecisionTree.Trainer(int J)
J - the maximum number of leaf nodes in the tree.public DecisionTree.Trainer(Attribute[] attributes, int J)
attributes - the attributes of independent variable.J - the maximum number of leaf nodes in the tree.public void setSplitRule(DecisionTree.SplitRule rule)
rule - the splitting rule.public void setMaximumLeafNodes(int J)
J - the maximum number of leaf nodes in the tree.public DecisionTree train(double[][] x, int[] y)
ClassifierTrainertrain in class ClassifierTrainer<double[]>x - the training instances.y - the training labels.Copyright © 2015. All rights reserved.