Skip to main content

Command Palette

Search for a command to run...

03 - Decision Trees and Random Forest: Classification and Regression

Discover decision trees (interpretable, easy to understand) and random forests (ensemble of trees for better results). Learn how entropy works, how to

Published
1 min readView as Markdown
F
Love coding and AI

Discover decision trees (interpretable, easy to understand) and random forests (ensemble of trees for better results). Learn how entropy works, how to build trees, overfitting issues, pruning, feature importance, and when to use them vs linear regression.

What you'll learn

  • Decision trees use recursive splits based on entropy or Gini impurity
  • Information Gain measures split quality: higher is better
  • Pruning (pre and post) is essential to prevent overfitting
  • Random Forest combines hundreds of trees with bootstrap and randomized features
  • OOB error estimates generalization without a separate validation set

This article is part of the Machine Learning series on federicocalo.dev.


Read the full article

The complete article (17 min read) with code examples, diagrams, and practical exercises is available here:

➡️ 03 - Decision Trees and Random Forest: Classification and Regression

https://federicocalo.dev/en/blog/decision-trees-random-forest-classification-regression


By Federico Calò — Software Developer & Technical Writer