How Exactly Does a Decision Tree Solve a Regression Problem?

Build your own decision tree regressor (from scratch in Python) and uncover what’s under the hood

Gurjinder Kaur
Towards Data Science
12 min readNov 25, 2023

--

Photo by Chris Lawton on Unsplash

In this article, I’m going to demonstrate through a simple example, flowchart, and code — the entire logic implemented under the hood of a decision tree regressor (aka regression tree). After reading…

--

--

Data Scientist @ CVS Health. Interested in reading and writing about Data Science and ML.