liveBook · Manning

Stopping criterion

As explained in Grokking Machine Learning

A criterion that prevents a decision-tree node from being split further.

A stopping criterion tells a decision tree when to stop splitting a node. It limits overfitting by preventing leaves from becoming too small or overly specialized. section 9.2

Common stopping criteria include:

  • Stop when the improvement in accuracy, Gini index, or entropy falls below a threshold. section 9.2
  • Stop when a node has fewer than a specified number of samples. section 9.2
  • Split only when both resulting leaves contain enough samples. section 9.2
  • Stop after reaching a maximum tree depth. section 9.2

App recommendations

A tree can first split users by age, then split the adult group by platform to create pure leaves. A stopping criterion can prevent further splits once leaves are sufficiently small or pure. section 9.2

Table 9.2 A simplified version of the dataset in table 9.1, where the age column has been simplified to two categories, “young” and “adult” (view table figure)

Platform

Age

App

iPhone

Young

Atom Count

iPhone

Adult

Check Mate Mate

Android

Adult

Beehive Finder

iPhone

Adult

Check Mate Mate

Android

Young

Atom Count

Android

Young

Atom Count

Use the simplified user dataset to trace how candidate splits create leaves and where a stopping criterion could limit further growth. section 9.2

How Grokking Machine Learning covers it

How deep it goes
Defines four hyperparameterized conditions but defers their detailed tuning to grid search.
Examples
Uses an app-recommendation dataset whose users are split by age and platform into increasingly pure leaves.
What it assumes
Assumes recursive decision-tree splitting and introduces stopping through accuracy, Gini index, entropy, samples, and depth.
What you can do after
Apply it by setting sample, impurity-improvement, leaf-size, or maximum-depth hyperparameters.
How it connects
Connects decision trees with overfitting, hyperparameters, accuracy, Gini index, entropy, validation sets, and grid search.

Also explained in

Compare how 11 books explain stopping criterion →

Related concepts

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