What is Decision tree?
In Turkish: Karar ağacı · Topic: Math foundations
A flowchart-like model that splits data into branches by asking yes-or-no questions, ending in a class or numeric prediction.
How does it work?
The tree starts at the root with all the data and searches for the feature and threshold that best separate it, such as whether age is under forty. Each split aims to make the resulting groups more uniform in their labels. The process repeats on each new branch, and when a leaf is reached, the majority class or average value in that leaf becomes the prediction. At prediction time, a new example travels from the root to a leaf by following the questions. If the tree grows too deep it memorizes the training data, so depth is limited or branches are pruned.
Why does it matter?
Because people can read the rules behind each decision, trees are valuable where explainability is required. They are also the building blocks of ensemble methods such as random forests and gradient boosting, which perform very well on tabular data. A single tree, on its own, can be unstable when the data changes slightly.
Example
A bank could move a loan application toward approval or rejection with a simple tree that first checks income level and then the existing debt ratio.
FAQ
What is the difference between a decision tree and a random forest?
A random forest is a vote among many trees trained on different samples of the data. It is usually more stable than a single tree but harder to interpret.
Do decision trees need feature scaling?
Usually not. Splits are based on threshold values, so the scale of the features has little effect on the result.