A decision tree with no depth limit is trained on 5,000 hotel bookings. Training accuracy is 99.6%; test accuracy is 74%. A tree limited to depth 5 scores 81% on train and 80% on test.
What is happening, and which tree should ship?
Why did you pick that answer? Two or three sentences. The act of articulating it is what builds the judgment — not the click that follows.
An unconstrained tree keeps splitting until every leaf is pure, carving out one leaf per quirky booking — a 25-point train–test gap is the signature of overfitting. The shallow tree gives up some training fit but its test score is what next month's bookings will see. Depth, min_samples_leaf, and pruning are the tree's regularization knobs; random forests and boosting are the systematic answer.
Training accuracy measures memory, not prediction. Only the held-out number counts.
Underfitting shows as low train and low test accuracy. Here train and test are nearly equal — that is the healthy pattern.
A 6-point test difference on 1,000+ held-out bookings is far outside noise, and the 25-point train–test gap is systematic.