Decision Tree Learning is supervised learning approach used in statistics, data mining and machine learning. In this formalism, a classification or regression decision tree is used as a predictive model to draw conclusions about a set of observations.

Tree models where the target variable can take a discrete set of values are called classification trees; in these tree structures, leaves represent class labels and branches represent conjunctions of features that lead to those class labels. Decision trees where the target variable can take continuous values (typically real numbers) are called regression trees.

Decision trees are among the most popular machine learning algorithms given their intelligibility and simplicity.[1]

In decision analysis, a decision tree can be used to visually and explicitly represent decisions and decision making. In data mining, a decision tree describes data (but the resulting classification tree can be an input for decision making).


A tree showing survival of passengers on the Titanic ("sibsp" is the number of spouses or siblings aboard). The figures under the leaves show the probability of survival and the percentage of observations in the leaf. Summarizing: Your chances of survival were good if you were (i) a female or (ii) a male younger than 9.5 years with strictly less than 3 siblings.

Decision tree learning is a method commonly used in data mining.[2] The goal is to create a model that predicts the value of a target variable based on several input variables.

A decision tree is a simple representation for classifying examples. For this section, assume that all of the input features have finite discrete domains, and there is a single target feature called the "classification". Each element of the domain of the classification is called a class. A decision tree or a classification tree is a tree in which each internal (non-leaf) node is labeled with an input feature. The arcs coming from a node labeled with an input feature are labeled with each of the possible values of the target feature or the arc leads to a subordinate decision node on a different input feature. Each leaf of the tree is labeled with a class or a probability distribution over the classes, signifying that the data set has been classified by the tree into either a specific class, or into a particular probability distribution (which, if the decision tree is well-constructed, is skewed towards certain subsets of classes).

A tree is built by splitting the source set, constituting the root node of the tree, into subsets—which constitute the successor children. The splitting is based on a set of splitting rules based on classification features.[3] This process is repeated on each derived subset in a recursive manner called recursive partitioning. The recursion is completed when the subset at a node has all the same values of the target variable, or when splitting no longer adds value to the predictions. This process of top-down induction of decision trees (TDIDT)[4] is an example of a greedy algorithm, and it is by far the most common strategy for learning decision trees from data.[5]

In data mining, decision trees can be described also as the combination of mathematical and computational techniques to aid the description, categorization and generalization of a given set of data.

Data comes in records of the form:

[math](\textbf{x},Y) = (x_1, x_2, x_3, ..., x_k, Y)[/math]

The dependent variable, [math]Y[/math], is the target variable that we are trying to understand, classify or generalize. The vector [math]\textbf{x}[/math] is composed of the features, [math]x_1, x_2, x_3[/math] etc., that are used for that task.

Decision tree types

Decision trees used in data mining are of two main types:

Type Description
Classification Tree Analysis is when the predicted outcome is the class (discrete) to which the data belongs.
Regression Tree Analysis is when the predicted outcome can be considered a real number (e.g. the price of a house, or a patient's length of stay in a hospital).

The term classification and regression tree (CART) analysis is an umbrella term used to refer to either of the above procedures, first introduced by Breiman et al. in 1984.[6] Trees used for regression and trees used for classification have some similarities – but also some differences, such as the procedure used to determine where to split.[6]

Some techniques, often called ensemble methods, construct more than one decision tree:

Header text Header text
Boosted trees Incrementally building an ensemble by training each new instance to emphasize the training instances previously mis-modeled. A typical example is AdaBoost. These can be used for regression-type and classification-type problems.[7][8]
Bootstrap aggregated Builds multiple decision trees by repeatedly resampling training data with replacement, and voting the trees for a consensus prediction.[9] A random forest classifier is a specific type of bootstrap aggregating


Amongst other data mining methods, decision trees have various advantages:

  • Simple to understand and interpret. People are able to understand decision tree models after a brief explanation. Trees can also be displayed graphically in a way that is easy for non-experts to interpret.[10]
  • Able to handle both numerical and categorical data.[10] Other techniques are usually specialized in analyzing datasets that have only one type of variable. (For example, relation rules can be used only with nominal variables while neural networks can be used only with numerical variables or categoricals converted to 0-1 values.) Early decision trees were only capable of handling categorical variables, but more recent versions, such as C4.5, do not have this limitation.[2]
  • Requires little data preparation. Other techniques often require data normalization. Since trees can handle qualitative predictors, there is no need to create dummy variables.[10]
  • Possible to validate a model using statistical tests. That makes it possible to account for the reliability of the model.
  • Non-parametric approach that makes no assumptions of the training data or prediction residuals; e.g., no distributional, independence, or constant variance assumptions
  • Performs well with large datasets. Large amounts of data can be analyzed using standard computing resources in reasonable time.
  • Mirrors human decision making more closely than other approaches.[10] This could be useful when modeling human decisions/behavior.
  • Robust against co-linearity, particularly boosting.
  • In built feature selection. Additional irrelevant feature will be less used so that they can be removed on subsequent runs. The hierarchy of attributes in a decision tree reflects the importance of attributes.[11] It means that the features on top are the most informative.[12]


  • Trees can be very non-robust. A small change in the training data can result in a large change in the tree and consequently the final predictions.[10]
  • The problem of learning an optimal decision tree is known to be NP-complete under several aspects of optimality and even for simple concepts.[13][14] Consequently, practical decision-tree learning algorithms are based on heuristics such as the greedy algorithm where locally optimal decisions are made at each node. Such algorithms cannot guarantee to return the globally optimal decision tree. To reduce the greedy effect of local optimality, some methods such as the dual information distance (DID) tree were proposed.[15]
  • Decision-tree learners can create over-complex trees that do not generalize well from the training data. (This is known as overfitting.[16]) Mechanisms such as pruning are necessary to avoid this problem (with the exception of some algorithms such as the Conditional Inference approach, that does not require pruning).[17][18][18]
  • The average depth of the tree that is defined by the number of nodes or tests till classification is not guaranteed to be minimal or small under various splitting criteria.[19]
  • For data including categorical variables with different numbers of levels, information gain in decision trees is biased in favor of attributes with more levels.[20] To counter this problem, instead of choosing the attribute with highest information gain, one can choose the attribute with the highest information gain ratio among the attributes whose information gain is greater than the mean information gain. [21] This biases the decision tree against considering attributes with a large number of distinct values, while not giving an unfair advantage to attributes with very low information gain. Alternatively, the issue of biased predictor selection can be avoided by the Conditional Inference approach,[17] a two-stage approach,[22] or adaptive leave-one-out feature selection.[23]


  1. "Top 10 algorithms in data mining" (in en) (2008-01-01). Knowledge and Information Systems 14 (1): 1–37. doi:10.1007/s10115-007-0114-2. ISSN 0219-3116. 
  2. 2.0 2.1 Rokach, Lior; Maimon, O. (2014). Data mining with decision trees: theory and applications, 2nd Edition. World Scientific Pub Co Inc. doi:10.1142/9097. ISBN 978-9814590075. S2CID 44697571.
  3. Shalev-Shwartz, Shai; Ben-David, Shai (2014). "18. Decision Trees". Understanding Machine Learning. Cambridge University Press.
  4. "Induction of decision trees" (1986). Machine Learning 1: 81–106. doi:10.1007/BF00116251. 
  5. "Top-down induction of decision trees classifiers-a survey" (2005). IEEE Transactions on Systems, Man, and Cybernetics - Part C: Applications and Reviews 35 (4): 476–487. doi:10.1109/TSMCC.2004.843247. 
  6. 6.0 6.1 Breiman, Leo; Friedman, J. H.; Olshen, R. A.; Stone, C. J. (1984). Classification and regression trees. Monterey, CA: Wadsworth & Brooks/Cole Advanced Books & Software. ISBN 978-0-412-04841-8.
  7. Friedman, J. H. (1999). Stochastic gradient boosting. Stanford University.
  8. Hastie, T., Tibshirani, R., Friedman, J. H. (2001). The elements of statistical learning : Data mining, inference, and prediction. New York: Springer Verlag.
  9. Breiman, L. (1996). "Bagging Predictors". Machine Learning 24 (2): 123–140. doi:10.1007/BF00058655. 
  10. 10.0 10.1 10.2 10.3 10.4 Gareth, James; Witten, Daniela; Hastie, Trevor; Tibshirani, Robert (2015). An Introduction to Statistical Learning. New York: Springer. pp. 315. ISBN 978-1-4614-7137-0.
  11. Provost, Foster, 1964- (2013). Data science for business : [what you need to know about data mining and data-analytic thinking]. Fawcett, Tom. (1st ed.). Sebastopol, Calif.: O'Reilly. ISBN 978-1-4493-6132-7. OCLC 844460899.CS1 maint: multiple names: authors list (link)
  12. "Role of Data Analytics in Infrastructure Asset Management: Overcoming Data Size and Quality Problems" (2020-06-01). Journal of Transportation Engineering, Part B: Pavements 146 (2): 04020022. doi:10.1061/JPEODX.0000175. 
  13. "Constructing Optimal Binary Decision Trees is NP-complete" (1976). Information Processing Letters 5 (1): 15–17. doi:10.1016/0020-0190(76)90095-8. 
  14. Murthy S. (1998). "Automatic construction of decision trees from data: A multidisciplinary survey". Data Mining and Knowledge Discovery
  15. Ben-Gal I. Dana A., Shkolnik N. and Singer (2014). "Efficient Construction of Decision Trees by the Dual Information Distance Method". Quality Technology & Quantitative Management 11 (1): 133–147. doi:10.1080/16843703.2014.11673330. 
  16. Principles of Data Mining. 2007. doi:10.1007/978-1-84628-766-4. ISBN 978-1-84628-765-7.
  17. 17.0 17.1 "Unbiased Recursive Partitioning: A Conditional Inference Framework" (2006). Journal of Computational and Graphical Statistics 15 (3): 651–674. doi:10.1198/106186006X133933. 
  18. 18.0 18.1 "An Introduction to Recursive Partitioning: Rationale, Application and Characteristics of Classification and Regression Trees, Bagging and Random Forests" (2009). Psychological Methods 14 (4): 323–348. doi:10.1037/a0016973. PMID 19968396. 
  19. Ben-Gal I. and Trister C. (2015). "Parallel Construction of Decision Trees with Consistently Non Increasing Expected Number of Tests" (PDF). Applied Stochastic Models in Business and Industry, Vol. 31(1) 64-78.
  20. Deng, H.; Runger, G.; Tuv, E. (2011). Bias of importance measures for multi-valued attributes and solutions. Proceedings of the 21st International Conference on Artificial Neural Networks (ICANN). pp. 293–300.
  21. Quinlan, J. Ross (1986). "Induction of Decision Trees". Machine Learning 1 (1): 81–106. doi:10.1007/BF00116251. 
  22. "Structural equation model trees." (in en) (2012). Psychological Methods 18 (1): 71–86. doi:10.1037/a0030001. PMID 22984789. 
  23. "Cross-Validated Variable Selection in Tree-Based Methods Improves Predictive Performance" (2017). IEEE Transactions on Pattern Analysis and Machine Intelligence 39 (11): 2142–2153. doi:10.1109/TPAMI.2016.2636831. PMID 28114007. 

Wikipedia References

  • Wikipedia contributors. "Decision tree". Wikipedia. Wikipedia. Retrieved 17 August 2022.