This project contains two files. A DecisionTree.py and a Driver.py file.
I have used two datasets for my analysis.
These are:
Iris Dataset.
Pima-Indian Dataset.
Here I have introduced a pruning mechanism where I am pruning the generated tree on each internal node and then if the testing accuracy is more for the pruned dataset I am printing the pruned tree along with its accuracy.
For 10 runs:
Accuracy before pruning : 70%
Best Accuracy obtained after pruning : 99%