Decision Tree With Cross Validation
Decision Tree With Cross Validation
Aim: One approach for solving the problem encountered in the previous question is using
cross- validation? Describe what is cross validation briefly. Train a decision tree again using
cross validation and report your results. Does accuracy increase/decrease? Why?
Pseudo code
Procedure:
Created a decision tree by using J48 Technique for the complete dataset as the training data in Weka
Explorer.
1. Open German data set arff file in Weka Explorer.
2. Select classifier tab, choose J48 decision tree and select cross validataion with fold size 2, 5 and
10 from test data option.
3. Start classification.
In Classify Tab, Select cross-validation option and folds size is 2 then Press Start Button, next
time change as folds size is 5 then press start, and next time change as folds size is 10 then press
start.
Output: The following model obtained after training the data set.
Fold Size – 2 output:
=== Run information ===