This is a ID3 Decision tree implemtation using Entropy gain and Variance impurity gain .
The code also performs post pruning.
Unzip dataset1 and datset2 zip files and provide the input for the MLAssignment.py
Required: python 3
Instructions to run: python MLAssignment.py L: integer (used in the post-pruning algorithm) K: integer (used in the post-pruning algorithm) to-print:{yes,no}
Creates a output.txt file with following:
- Entropy tree before pruning
- Entropy tree after pruning
- Accuracy of Entropy tree on testdata set before pruning
- Accuracy of Entropy tree on testdata set after pruning
- Variance impurity tree before pruning
- Variance impurity tree after pruning
- Accuracy of Variance impurity tree on testdata set before pruning
- Accuracy of Variance impurity tree on testdata set after pruning