Skip to content

VVshow123/DesicionTree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The ID3: This is a project that grows a decision tree with ID3 algorithm. It contains,

  1. A method to read the input data to a 2-dimentional array. The rows are the tuples and the columns are the attributes.
  2. A function to calculate the entropy of each attributes.
  3. A method to classify with attributes with “0” or “1”.
  4. A method to split the data according to the classification of each attributes.
  5. A function to calculate the information gain after the data is divided into two parts.
  6. A function to grow the tree with ID3 algorithm to maximum the information gain after each splitting.
  7. Some tree properties such as counting the internal nodes, counting the leaf nodes to do statistics.
  8. A test function to test the accuracy of each prediction.
  9. A method to print the tree.
  10. A function to prone the decision tree to improve accuracy.

The Random: This is based on the ID3 decision tree. It is added

  1. a random function to generate a new decision tree and its print function
  2. another function to calculate the average depth.

About

DesicionTree

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%