Vismo · Create · Explore · Topics · Guides · Pricing

ID3 Decision Trees and Stopping Rules

An eight-row dataset with two binary features is used to build a decision tree step by step. The root splits on feature A, each branch splits on B, and the animation highlights three stopping conditions: pure leaves, exhausted features, and ties resolved by parent majority. Tracing all samples through the finished tree shows six correct predictions out of eight, illustrating why identical inputs with conflicting labels cap achievable accuracy. Useful for students learning the full ID3 algorithm beyond just information gain.

Narrated · 16:9 · Preview before teaching · automatic layout checks do not establish subject accuracy

The prompt that made it

# Building an ID3 tree includes knowing when to stop Build a decision tree from eight rows (A,B,label): (0,0,+), (0,0,+), (0,1,+), (0,1,-), (1,0,+), (1,0,-), (1,1,-), (1,1,-). The root gains tie, so choose A alphabetically. Split each child by B. The A=0,B=0 leaf is purely positive, and A=1,B=1 is purely negative. The other two leaves each contain one positive and one negative with identical features. Because no features remain, stop and resolve each tie using its parent node's majority: positive under A=0, negative under A=1. Trace all samples through the completed tree to reveal six correct predictions out of eight. Explain why contradictory labels on identical inputs prevent perfect deterministic classification. Animate the stopping rules for pure nodes, exhausted features, and empty branches. Use black backgrounds, white branches, and consistent class colors. Useful for understanding the complete ID3 workflow rather than only its splitting rule. Audience: 一年级人工智能专业学生

Make your own version

Make the next one in this series