CART
CART is a decision-tree learning algorithm that recursively partitions data into binary branches for classification or regression.
Grokking AI Algorithms, Second Edition
CART is a decision-tree algorithm that constructs binary trees for classification and regression.
- How it is used
- Uses binary questions to classify examples such as diamonds by learning useful feature thresholds.
- How deep it goes
- Explains data structures, Gini uncertainty, information gain, candidate splits, recursion, and stopping, while leaving formal theory aside.
- Examples
- Uses Okay and Perfect diamond labels, Carat and Price questions, tree diagrams, and Python implementations.
- What you can do after
- Builds a basic decision tree from scratch using questions, Gini calculations, information gain, nodes, and recursion.
Read how Grokking AI Algorithms, Second Edition explains CART →
Machine Learning Algorithms in Depth
CART is a decision-tree learning algorithm that recursively partitions data using optimized split criteria.
- How it is used
- Uses CART as a supervised-learning classifier and as an example of recursive divide and conquer.
- How deep it goes
- Derives feature-threshold selection and impurity objectives, then begins a Python implementation; greedy splitting does not establish a globally optimal tree.
- Examples
- Shows a TreeNode and DecisionTreeClassifier implementation with class counts, child links, maximum depth, and a best_split routine.
- What you can do after
- Build it from scratch as a greedy classification tree that selects feature thresholds and recursively creates nodes.
Read how Machine Learning Algorithms in Depth explains CART →
Related concepts
- decision treeimplements · A decision tree is a branching structure that represents sequential tests or choices, with paths leading to outcomes, predictions, or actions.
- Gini impurityuses · Gini impurity is a measure of class-label heterogeneity in a set or decision-tree node, calculated from the proportions of its classes.
- divide-and-conquer approachuses · Divide and conquer is a problem-solving strategy that decomposes a problem into smaller parts, handles them separately, and combines or completes their results.
- recursionkind of · Recursion is a computational technique in which a definition or procedure refers to or invokes the same definition or procedure, directly or indirectly.
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.

