public class CrossValidationEx1 extends Object
In this example, the
QUEST
algorithm is first used to fit a decision tree to simulated data. Then the
minimal cost-complexity value is found via cross-validation. The class
CrossValidation
constructor accepts the decision tree object and then the method
CrossValidation.crossValidate()
is called to run the procedure.
Finally, the tree is pruned using the result. Notice that the optimally
pruned tree consists of just the root node, whereas the maximal tree has five
nodes and three levels.
Constructor and Description |
---|
CrossValidationEx1() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
The main method of the example.
|
Copyright © 2020 Rogue Wave Software. All rights reserved.