Decision Tree Machine Learning Algorithm from Scratch in Python

Dhiraj K
4 min readSep 21, 2020

Yes, you read it right !! A tree can take decision !!

Introduction:

When we are implementing the Decision Tree Machine Learning Algorithm using sklearn, we are calling the sklearn library methods. Hence we are not implementing the algorithm from scratch.

In this article, we will be implementing a Decision Tree algorithm without relying on Python’s easy-to-use sklearn library. The goal of this post is to discuss the fundamental mathematics and statistics behind a Decision Tree algorithm model. I hope this will help you understand at a low level, how Decision Tree works in the background.

A decision tree algorithm, is a machine learning technique, for making predictions. As its name suggests, it behaves like a tree structure. The decision tree is built by, repeatedly splitting, training data, into smaller and smaller samples.

Decision Tree from Scratch in Python
Decision Tree from Scratch in Python

Decision Tree works on, the principle of conditions. The algorithm checks conditions, at a node, and split the data, as per the result, of the…

--

--

Dhiraj K
Dhiraj K

Written by Dhiraj K

Data Scientist & Machine Learning Evangelist. I like to mess with data. dhiraj10099@gmail.com

Responses (3)