A decision tree is a machine learning model that makes a prediction by asking a series of simple questions about the data, such as "is the order over $500?", and following the branches until it reaches an answer. It is one of the easiest models to explain to non-specialists, which is why we at Saraswati Stitch often start with one when a client needs to see why a prediction was made.
How it works
IBM describes a decision tree as a supervised learning algorithm used for both classification and regression. During training it looks at labelled examples and picks, at each step, the question that best separates the outcomes. The result looks like an upside-down tree: a root question, branches for each answer, and leaves that hold the prediction.
For example, a churn model might ask whether a customer has logged in during the last 30 days, then whether they have raised a support complaint, then how long they have been a customer, and end at "likely to cancel" or "likely to stay".
Business examples
| Use | Questions the tree asks |
|---|---|
| Loan pre-approval | Income band, existing debt, credit history length |
| Customer churn | Recent activity, complaints, contract length |
| Lead scoring | Company size, pages viewed, source |
| Support routing | Product, issue type, customer tier |
| Fraud flags | Amount, location change, time of day |
Strengths and limits
Decision trees are fast, need little data preparation and can be read by anyone, which helps with explainable AI requirements. Their weakness is that a single tree can memorise its training data and perform badly on new cases, known as overfitting. Combining many trees into a random forest fixes much of that at the cost of some readability.
Is a decision tree considered AI?
Yes, it is a machine learning model, which is a branch of AI. It is simpler than the neural networks behind chatbots, and often the better choice for structured business data in rows and columns.
What is the difference between a flowchart and a decision tree?
A flowchart is written by a person to describe a process. A decision tree in machine learning is learned from data: the algorithm chooses the questions and the thresholds.
Saraswati Stitch®