Umbrella Decision Tree
Drag weather sliders, tune decision thresholds, and watch the tree re-draw live — learning exactly how decision trees make multi-factor decisions!
How Decision Trees Make Decisions
Ask Questions
At each node, the tree asks a yes/no question: "Is rain chance > 60%?" Split the data based on the answer.
Split the Data
Each split divides data into two groups. We want each group to be as "pure" as possible — all umbrella or all no-umbrella.
Reach a Leaf
Follow the branches until you reach a leaf node. The leaf gives the final prediction: carry or don't carry!
Pruning
Removing branches that don't improve accuracy. Simpler trees generalise better to new weather data!
Step 1 — Set Today's Weather
Step 2 — Full Decision Tree
🌳 Tree Info
🔵 Blue path = current weather route
☂️ Green leaf = carry umbrella
☀️ Gray leaf = no umbrella needed
Diamond = decision node
Circle = leaf node (answer)
Step 3 — Tune Decision Thresholds
🎛️ Decision Thresholds
Step 4 — Full Test Report
| Day | 🌧️ Rain | 💧 Humid | ☁️ Cloud | 💨 Wind | Truth | Predicted | ✓ |
|---|
Decision Tree Expert Badge!
You built a weather decision tree and tuned its thresholds to maximise accuracy!
Optional. Stays on this device only — not sent to WhizzStep.
Key Concepts Mastered
❓ Ask a Question
Each internal node tests one feature: "Is rain > 55%?" Data is split into Yes and No branches.
🍃 The Answer
Terminal nodes that give the final prediction. No more splitting — just the class label.
📊 Split Quality
Measures how mixed the classes are at a node. Lower Gini = purer split = better decision boundary.
✂️ Where to Split
The value that divides continuous features. Rain > 55% is a threshold. Tuning thresholds is key to accuracy.
😵 Too Deep
A very deep tree memorises training data but fails on new data. Pruning and max-depth limits help.
🌲🌲🌲 Many Trees
Train 100 decision trees on random subsets. Their majority vote is much more accurate than any single tree!
About this lab
Learning objective: Use a simple weather scenario to see how a decision tree chooses between outcomes based on conditions.
What this simplifies: The scenario is intentionally simple with few variables to keep the logic visible.
Privacy: No learner input leaves the device.
Teacher prompt: Ask the class why this simulation might mislead someone who takes it too literally.
Reflect: What is one thing this activity showed you that you did not expect?
← Back to all Labs