Drag weather sliders, tune decision thresholds, and watch the tree re-draw live โ learning exactly how decision trees make multi-factor decisions!
At each node, the tree asks a yes/no question: "Is rain chance > 60%?" Split the data based on the answer.
Each split divides data into two groups. We want each group to be as "pure" as possible โ all umbrella or all no-umbrella.
Follow the branches until you reach a leaf node. The leaf gives the final prediction: carry or don't carry!
Removing branches that don't improve accuracy. Simpler trees generalise better to new weather data!
| Day | ๐ง๏ธ Rain | ๐ง Humid | โ๏ธ Cloud | ๐จ Wind | Truth | Predicted | โ |
|---|
You built a weather decision tree and tuned its thresholds to maximise accuracy!
Each internal node tests one feature: "Is rain > 55%?" Data is split into Yes and No branches.
Terminal nodes that give the final prediction. No more splitting โ just the class label.
Measures how mixed the classes are at a node. Lower Gini = purer split = better decision boundary.
The value that divides continuous features. Rain > 55% is a threshold. Tuning thresholds is key to accuracy.
A very deep tree memorises training data but fails on new data. Pruning and max-depth limits help.
Train 100 decision trees on random subsets. Their majority vote is much more accurate than any single tree!