liveBook · Manning

Split

As explained in Grokking Machine Learning, Second Edition

A split is a decision-tree operation that partitions examples at a node into subsets according to a feature-based condition.

A split asks a feature-based question and divides the examples at a decision-tree node into two subsets. The goal is to make the resulting groups easier to classify. section 9.4 section 9.9

A practical split follows this pattern:

  • Choose candidate questions, such as “Is the user younger than 20?” section 9.9
  • Divide the data into the examples answering yes and those answering no. section 9.9
  • Compare weighted accuracy, Gini impurity, and entropy, then select the strongest split. section 9.9
  • Stop splitting a pure group and turn it into a leaf node; continue with groups that still contain mixed labels. section 9.4

A small age split

For ages 12, 14, 15, 25, 32, and 35, possible cutoffs lie between consecutive ages. The question “Is the user younger than 20?” creates labels {A, A, A} and {C, B, C}, reaches 5/6 accuracy, and has the lowest listed Gini impurity and entropy. section 9.9

Figure 9.19 A graphic of the seven possible ways to split the users by age. Note that it doesn’t matter where we put the cutoffs, as long as they lie between consecutive ages (except for the first and last cutoff).

Visualizes the possible age cutoffs and shows why thresholds between consecutive ages produce distinct partitions. section 9.9

How Grokking Machine Learning, Second Edition covers it

How deep it goes
Explains candidate thresholds, evaluation metrics, purity-based stopping, and split-controlling hyperparameters.
Examples
Uses app recommendations split by age and platform, plus student-admission tree settings.
What it assumes
Assumes labeled examples and basic classification while teaching threshold selection and impurity comparison through small datasets.
What you can do after
Build it from scratch by generating feature questions, evaluating partitions, and continuing until groups become leaves.
How it connects
Connects decision trees with leaf nodes, accuracy, Gini impurity, entropy, overfitting, and hyperparameters.

Also explained in

Compare how 4 books explain split →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning, Second Edition. The section links point to the parts of the book it draws on.