Skip to content

ID3 implementation using Entropy and Varaince impurity

Notifications You must be signed in to change notification settings

ganigavinaya/ID3

Repository files navigation

ID3

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:

  1. Entropy tree before pruning
  2. Entropy tree after pruning
  3. Accuracy of Entropy tree on testdata set before pruning
  4. Accuracy of Entropy tree on testdata set after pruning
  5. Variance impurity tree before pruning
  6. Variance impurity tree after pruning
  7. Accuracy of Variance impurity tree on testdata set before pruning
  8. Accuracy of Variance impurity tree on testdata set after pruning

About

ID3 implementation using Entropy and Varaince impurity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages