Package com.imsl.test.example.datamining
Class CrossValidationEx1
java.lang.Object
com.imsl.test.example.datamining.CrossValidationEx1
Uses cross-validation to determine the optimally pruned decision tree.
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
CrossValidationEx1
public CrossValidationEx1()
-
-
Method Details
-
main
The main method of the example.- Throws:
Exception
-