Skip to content

Decision Tree that I build is completely from scratch and it's make a decision based on Categorical data it's predicts only for yes or no ( 0, 1) not for numeric values the example is given in the README.md file

Notifications You must be signed in to change notification settings

Ruhaan838/Decision-Tree-From-Scratch-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Decision Tree from Scratch

  • This version of Decision Tree is completly build using algorithm ID3 (Iterative Dichotomiser 3).

  • In code Mostly work is done using Pandas and math

    • Pandas for Data manipulation.
    • math for mathematical operations.
  • It's also Construct the Tree using Node class.

  • One simple visilization of tree is also there. (if verbose = 1)

       Outlook (Gain: 0.2467)
      |── Rainy
      Windy (Gain: 0.9403)
          |── Strong
          |── Weak
      |── Overcast
      |── Sunny
      Humidity (Gain: 0.9403)
          |── High
          |── Normal 
    
  • Example data:

    • Train Data : Outlook, Temperature, Humidity, Windy
    • Label : PlayTennis
    Outlook Temperature Humidity Windy PlayTennis
    Sunny Hot High Weak No
    Sunny Hot High Strong No
    Overcast Hot High Weak Yes
    Rainy Mild High Weak Yes
    Rainy Cool Normal Weak Yes
    Rainy Cool Normal Strong No
    Overcast Cool Normal Strong Yes
    Sunny Mild High Weak No
    Sunny Cool Normal Weak Yes
    Rainy Mild Normal Weak Yes
    Sunny Mild Normal Strong Yes
    Overcast Mild High Strong Yes
    Overcast Hot High Weak Yes
    Rainy Mild High Strong No

About

Decision Tree that I build is completely from scratch and it's make a decision based on Categorical data it's predicts only for yes or no ( 0, 1) not for numeric values the example is given in the README.md file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages