Member-only story

Decision Trees: A Powerful Tool in Machine Learning

Decision trees handle both classification and regression tasks.

5 min readJun 24, 2023

--

Let’s start by exploring the concept of decision trees in a simple and easy-to-follow manner.

Image by Author

Each node in a decision tree represents a decision or a question about a specific feature. Based on the answer, we navigate through the corresponding branch to reach another node, ultimately leading us to a leaf node. These leaf nodes provide us with the desired outcome or prediction.

To establish a formal definition:

A decision tree is a supervised machine learning algorithm that recursively splits the data based on different attributes and their thresholds, creating decision boundaries that divide the input space into regions associated with specific outcomes or class labels.

Example

To illustrate the concept further, let’s consider an example where we aim to predict whether someone will go for a run based on two factors: weather and temperature.

You can checkout this video to learn more on Decision trees:

--

--

Nidhi Gahlawat
Nidhi Gahlawat

Written by Nidhi Gahlawat

Software Engineer | I write about machine learning, AI, iOS dev, programming languages and everything in between | Coffee keeps me alive!

No responses yet