Skip to content

fleralle/decision-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementing Decision Tree Algorithm from scratch

The purpose of the tutorial is to implement step-by-step a Decision Tree algorithm from scratch using both ID3 (Iterative Dichotomiser 3) and CART (Classification And Regression Tree) algorithms.

As we code along, we will dive more in depth in each algorithms. Most of the code in made in the DecisionTree.py file at the root of the project.

Setup

In order to test our models, we will use the Titanic dataset available here

Theory

For more detail regarding the Theory behind the Decision tree, I have listed bellow a serie of useful links explaining how it works and the variants:

PRO vs CONS

Advantages

  • Easy to interpret and visualise
  • Works on non-linear patterns
  • No need to preprocess/normalise the data prior running models
  • No assumption needed regarding features distribution

Disadvantages

  • Sensitive to data noise. Easy to overfit the model
  • Sensitive to imbalance dataset

About

Building a decision tree model from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published