← All books

Book cover of Decision Trees in Machine Learning and Data Science by Faramarz Kowsari

Decision Trees in Machine Learning and Data Science

A Visual Infographic Guide from Entropy and Gini to Python, Pruning, and Interpretable AI

Faramarz Kowsari · English · Data Science

Free Google Books Preview

Read a free sample of this book on Google Books before you buy.

About this book

Decision Trees in Machine Learning and Data Science is a 136-page visual learning system that turns one of machine learning’s most interpretable model families into a sequence of diagrams, formulas, worked examples, code panels, projects, warnings, interview questions, and quick-reference pages. It begins with the core intuition that a decision tree is a learned hierarchy of useful questions. From there, the reader moves through supervised-learning context, classification versus regression, interpretability and limitations, then into the anatomy of roots, internal nodes, branches, leaves, decision paths, thresholds, depth, and binary or multi-way splits.

The mathematical core explains how a tree decides where to split. Impurity, entropy, information gain, Gini impurity, weighted impurity, regression error measures, and split selection are developed visually before the book moves into recursive partitioning, greedy learning, ID3, C4.5, CART, stopping criteria, overfitting, bias–variance trade-offs, validation, class imbalance, sample weighting, leakage, and pruning. Cost-complexity pruning and model control are treated not as optional cleanup but as part of the discipline required to keep a tree useful beyond the training data.

The final third converts the theory into practice with Python and scikit-learn workflows for classifiers and regressors, encoding, visualization, metrics, model inspection, and GridSearchCV. Real-world projects span classic and applied problems such as Play Tennis, Titanic survival, churn, credit decisions, car evaluation, heart-disease examples, factory scenarios, weather, and house prices, with educational and ethical cautions where the domain requires them. Interview questions, common mistakes, formula references, a visual glossary, and a final concept map connect the entire journey from data to questions, splits, impurity, algorithms, pruning, Python, projects, interpretation, and interpretable AI.

What you will learn

Key topics

Who this book is for

For students, data analysts, aspiring data scientists, machine-learning practitioners, Python learners, interview candidates, and visual learners who want to understand decision trees from intuition and mathematics through implementation, model control, projects, and interpretable AI.

Browse Books by Topic

Explore the library by subject and find related books faster.