A bank wants to approve or decline loans. We hold a Dataset of 20 past loans, 10 that were repaid and 10 that defaulted, each with facts such as income and whether the applicant ever missed a payment.
The Trainer does not follow rules a person wrote. It searches the data for good yes/no questions and arranges them into a flowchart: the decision tree. A new applicant is sent down the chart, and the box where they end up gives the decision.
💡Good to know
Trees work on tables of facts and need no feature scaling, which is why they are a common first choice.