Implementing a Decision Tree

I implemented three variants of a decision tree from scratch in this project. They are (a) a binary decision tree with no pruning using the ID3 algorithm, (b) a binary decision tree with a given maximum depth, and ( c) a binary decision tree with post-pruning using reduced error pruning. (Link to Github Repo of Source Code).

Here is some analysis I carried out to understand and compare the different implementations.

Vanilla Model

A binary decision tree with no pruning using the ID3 algorithm.

Depth Limited Model

A binary decision tree with a given maximum depth.

Decision Tree with Post Pruning

A binary decision tree with post pruning.

Written by

Code. Debug. Repeat. Currently an SDE II at Amazon AI (AWS SageMaker Hosting). Always promoting curiosity, camaraderie and compassion. All opinions are my own.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store