Decision tree
A decision tree is a branching structure that represents sequential tests or choices, with paths leading to outcomes, predictions, or actions.
Grokking Machine Learning
An algorithm that recursively splits labeled data using feature tests and stopping conditions to construct a decision tree.
- How it is used
- Uses labeled features to predict classes or values, including app recommendations and user engagement.
- How deep it goes
- Works through recursive classification splits, impurity comparisons, geometric boundaries, and regression cutoffs, then fits trees with Scikit-Learn.
- Examples
- Uses jacket decisions, app downloads, plotted classification boundaries, age-based engagement, and fraud-detection and health exercises.
- What you can do after
- Build it from scratch by choosing and repeating feature splits, or apply it via Scikit-Learn to classification and regression data.
Statistics Every Programmer Needs
A decision tree is a graphical decision-analysis model that represents choices, uncertain events, possible outcomes, probabilities, and payoffs as branching paths.
- How it is used
- Maps choices, uncertain events, and payoffs to compare actions by expected value.
- How deep it goes
- Works through schema construction, probability checks, backward expected-payoff calculations, and plotting rather than predictive-model training.
- Examples
- Compares baseball contract offers using health, performance incentives, agent fees, branch probabilities, and plotted payoffs.
- What you can do after
- Build it from scratch by specifying branches and payoffs, calculating expected values, and plotting the result with Python.
Read how Statistics Every Programmer Needs explains decision tree →
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
A decision tree is a predictive model that recursively partitions inputs using feature-based split rules and produces outcomes at terminal leaves.
- How it is used
- Uses feature-based rules to make explainable predictions for tabular classification and regression problems.
- How deep it goes
- Explains roots, branches, leaves, split criteria, complexity controls, and ensemble roles without deriving impurity formulas.
- Examples
- Uses animal classification, Airbnb price classification, nonlinear-function approximation, and extracted XGBoost or LightGBM tree paths.
- What you can do after
- Apply it via scikit-learn pipelines, cross-validation, and depth or sample-size controls for tabular classification.
Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains decision tree →
Ensemble Methods for Machine Learning
A decision tree is a predictive model that recursively partitions data according to feature-based decisions, producing predictions at the resulting leaves.
- How it is used
- Models supervised classification and regression while illustrating fit, complexity, and interpretability tradeoffs.
- How deep it goes
- Explains nodes, leaves, depth, nonlinear growth, evaluation curves, and rule interpretation without deriving split optimization.
- Examples
- Uses Friedman-1 regression, a noisy nonlinear function, and Iris species classification with visualized rules.
- What you can do after
- Apply it via scikit-learn to train bounded-depth regressors or classifiers, evaluate held-out performance, and inspect learned rules.
Read how Ensemble Methods for Machine Learning explains decision tree →
Statistics Slam Dunk
A decision tree is a predictive model that recursively partitions data using feature-based decision rules.
- How it is used
- Uses decision tree regression to isolate hustle statistics associated with regular-season wins.
- How deep it goes
- Explains predictor splits, terminal nodes, residual error, fitting, and visualization without detailing the tree-building algorithm.
- Examples
- Models NBA regular-season wins from screen points, deflections, loose balls, and contested-shot statistics.
- What you can do after
- Apply it via R's tree() function to fit and visualize continuous-outcome prediction rules.
Outlier Detection in Python
A decision tree is a hierarchical predictive model that recursively partitions observations using feature-based decision rules.
- How it is used
- Uses trees to flag real records resembling synthetic ones and to provide interpretable approximations of outlier-detector predictions.
- How deep it goes
- Works through synthetic-data classification and proxy fitting with evaluation, but does not derive tree-splitting internals.
- Examples
- Uses breast-cancer records for real-versus-fake classification and feature-threshold rules for an Isolation Forest proxy.
- What you can do after
- Apply it via scikit-learn to identify real-versus-synthetic outlier candidates or approximate a detector’s scores and binary labels.
Read how Outlier Detection in Python explains decision tree →
Grokking AI Algorithms, Second Edition
A decision tree is a predictive model that recursively applies feature-based tests to partition examples and produce a classification or regression outcome.
- How it is used
- Uses feature-based questions to learn categories of examples in a classification problem.
- How deep it goes
- Works through CART training, Gini uncertainty, information gain, recursive tree construction, and testing rather than stopping at a definition.
- Examples
- Traces Carat and Price questions for diamond-cut groups, then checks predictions on ten new examples.
- What you can do after
- Build it from scratch with Python decision and leaf nodes, then evaluate classifications against labeled test data.
Read how Grokking AI Algorithms, Second Edition explains decision tree →
Data Without Labels
A tree-structured predictive model that recursively splits data into nodes using decision rules.
- How it is used
- Frames decision tree as an available algorithm for supervised regression problems.
- How deep it goes
- Defines roots, decision nodes, and terminal nodes, but does not explain split criteria, training, or prediction procedures.
- Examples
- Places decision trees beside a height-to-weight regression problem and a structured telecom churn dataset.
- What you can do after
- Evaluate/understand a decision tree’s basic node-and-split structure and recognize it as a regression option.
Inside AI
A decision tree is a hierarchical predictive model that recursively splits data according to attribute-based questions to reach decisions or predictions.
- How it is used
- Supports classification by mapping labeled input data to categories or decisions through sequential attribute tests.
- How deep it goes
- Explains nodes, branches, leaves, recursive partitioning, and attribute ranking, but does not provide the underlying mathematical formulas.
- Examples
- Uses animal classification and credit-card fraud detection to demonstrate question ordering, branching, and final decisions.
- What you can do after
- Build it from scratch by ranking transaction attributes, recursively partitioning labeled records, and assigning decisions to terminal branches.
Machine Learning Algorithms in Depth
A decision tree is a hierarchical predictive model that makes decisions by applying feature-based tests at internal nodes.
- How it is used
- Uses supervised classification and regression by recursively partitioning feature space into predictive leaf regions.
- How deep it goes
- Derives feature-threshold selection, impurity objectives, and recursive growth, then implements CART while deferring complete optimization details.
- Examples
- Demonstrates CART with an Iris dataset workflow, accuracy scoring, and a from-scratch node-and-classifier implementation.
- What you can do after
- Build it from scratch by selecting thresholds, minimizing impurity, growing nodes recursively, and evaluating classification predictions.
Read how Machine Learning Algorithms in Depth explains decision tree →
Machine Learning Platform Engineering
A decision tree is a predictive model that recursively partitions input data using feature-based decision rules.
- How it is used
- Deploys a decision tree as a tracked income-classification experiment within a reproducible ML workflow.
- How deep it goes
- Explains implementation through preprocessing, fitting, evaluation, dataset logging, parameter logging, and model persistence.
- Examples
- Demonstrates an income classifier trained on encoded features and compared with random forest and XGBoost models.
- What you can do after
- Build a tracked decision-tree experiment that records datasets, metrics, parameters, and a reloadable model artifact.
Read how Machine Learning Platform Engineering explains decision tree →
Demand Forecasting Best Practices
A decision tree is a machine-learning model that makes predictions by applying a sequence of feature-based questions and following the resulting branches to a terminal prediction.
- How it is used
- Applies learned feature relationships to supply-chain forecasting and other prediction decisions.
- How deep it goes
- Explains nodes, leaves, splits, and error-minimizing questions, while stopping short of detailed growth algorithms.
- Examples
- Uses Guess Who? and a demand dataset involving brand, price, promotion, and historical demand.
- What you can do after
- Evaluate decision-tree paths by identifying features, splits, terminal predictions, and the rationale for question selection.
Read how Demand Forecasting Best Practices explains decision tree →
Data-Driven Cybersecurity
A predictive model that recursively partitions data through feature-based decision rules arranged in a tree structure.
- How it is used
- Uses sequential feature-based decisions to classify cybersecurity activity and support threat-detection analysis.
- How deep it goes
- Explains nodes, branches, leaves, and root-to-leaf paths, but stops short of detailed training internals.
- Examples
- Illustrates trusted senders, login attempts, network traffic, phishing detection, and safe-versus-threat leaf outcomes.
- What you can do after
- Evaluate decision-tree-based classification within practical cybersecurity threat-detection workflows.
Related concepts
- leaf nodehas part · A leaf node is a node in a tree or hierarchical structure that has no child nodes and cannot be further subdivided.
- random forestpart of · A random forest is an ensemble model that combines predictions from multiple decision trees built with randomized data samples, feature selections, or both.
- language modelkind of · A language model is a computational model that represents patterns in linguistic tokens to estimate sequence probabilities and predict or generate language from context.
- decision nodehas part · A decision node is a tree node where a decision, test, or action selection determines which successor branch is followed.
- decision stumpincludes · A decision stump is a decision tree of depth one with a single decision node and prediction leaves.
- XGBoostused by · XGBoost is an open-source software library for efficient gradient-boosted decision-tree algorithms used in supervised machine learning.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.












