encyclopegia.org

Decision tree

A decision tree is a decision support recursive partitioning structure that uses a tree-like model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility.[src] It is one way to display an algorithm that only contains conditional control statements.[src] Decision trees are commonly used in operations research, specifically in decision analysis, to help identify a strategy most likely to reach a goal, but are also a popular tool in machine learning.[src]

A decision tree is a decision support recursive partitioning structure that uses a tree-like model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility.[src] It is one way to display an algorithm that only contains conditional control statements.[src] Decision trees are commonly used in operations research, specifically in decision analysis, to help identify a strategy most likely to reach a goal, but are also a popular tool in machine learning.[src] ===Increasing the number of levels of the tree=== The accuracy of the decision tree can change based on the depth of the decision tree.[src] In many cases, the tree's leaves are pure nodes.[src] When a node is pure, it means that all the data in that node belongs to a single class.[src] For example, if the classes in the data set are Cancer and Non-Cancer a leaf node would be considered pure when all the sample data in a leaf node is part of only one class, either cancer or non-cancer.[src] A deeper tree is not always better when optimizing the decision tree.[src] A deeper tree can influence the runtime in a negative way.[src] If a certain classification algorithm is being used, then a deeper tree could mean the runtime of this classification algorithm is significantly slower.[src] There is also the possibility that the actual algorithm building the decision tree will get significantly slower as the tree gets deeper.[src] If the tree-building algorithm being used splits pure nodes, then a decrease in the overall accuracy of the tree classifier could be experienced.[src] As depth increases, the bias decreases as variance increases, following the phenomenon of the bias-variance tradeoff.[src] Occasionally, going deeper in the tree can cause an accuracy decrease in general, so it is very important to test modifying the depth of the decision tree and selecting the depth that produces the best results.[src] This instability of decision trees can be accredited to the intrinsic hierarchal structure a tree forms.[src] Shallower nodes can propagate error down to following nodes, weakening the accuracy of the model.[src] To summarize, observe the points below, we will define the number D as the depth of the tree.[src] Possible advantages of increasing the number D: Accuracy of the decision-tree classification model increases.[src] Possible disadvantages of increasing D Slower runtime Slower tree optimization Decrease in accuracy The ability to test the differences in classification results when changing D is imperative.[src] We must be able to easily change and test the variables that could affect the accuracy and reliability of the decision tree-model.[src] ===The choice of node-splitting functions=== The node splitting function used can have an impact on improving the accuracy of the decision tree.[src] For example, using the information-gain function may yield better results than using the phi function.[src] The phi function is known as a measure of "goodness" of a candidate split at a node in the decision tree.[src] The information gain function is known as a measure of the "reduction in entropy".[src] In the following, we will build two decision trees.[src] One decision tree will be built using the phi function to split the nodes and one decision tree will be built using the information gain function to split the nodes.[src] The main advantages and disadvantages of information gain and phi function One major drawback of information gain is that the feature that is chosen as the next node in the tree tends to have more unique values.[src] An advantage of information gain is that it tends to choose the most impactful features that are close to the root of the tree.[src] It is a very good measure for deciding the relevance of some features.[src] The phi function is also a good measure for deciding the relevance of some features based on "goodness".[src] This is the information gain function formula.[src] The formula states the information gain is a function of the entropy of a node of the decision tree minus the entropy of a candidate split at node t of a decision tree.[src] I_{\textrm{gain}}(s) = H(t) - H(s,t) This is the phi function formula.[src] The phi function is maximized when the chosen feature splits the samples in a way that produces homogenous splits and have around the same number of samples in each split.[src] \Phi(s,t) = (2*P_L*P_R ) * Q(s|t) We will set D, which is the depth of the decision tree we are building, to three (D = 3).[src] We also have the following data set of cancer and non-cancer samples and the mutation features that the samples either have or do not have.[src] If a sample has a feature mutation then the sample is positive for that mutation, and it will be represented by one.[src] If a sample does not have a feature mutation then the sample is negative for that mutation, and it will be represented by zero.[src] To summarize, C stands for cancer and NC stands for non-cancer.[src] The letter M stands for mutation, and if a sample has a particular mutation it will show up in the table as a one and otherwise zero.[src] Now, we can use the formulas to calculate the phi function values and information gain values for each M in the dataset.[src] Once all the values are calculated the tree can be produced.[src] The first thing to be done is to select the root node.[src] In information gain and the phi function we consider the optimal split to be the mutation that produces the highest value for information gain or the phi function.[src] Now assume that M1 has the highest phi function value and M4 has the highest information gain value.[src] The M1 mutation will be the root of our phi function tree and M4 will be the root of our information gain tree.[src] You can observe the root nodes below Now, once we have chosen the root node we can split the samples into two groups based on whether a sample is positive or negative for the root node mutation.[src] The groups will be called group A and group B.[src] For example, if we use M1 to split the samples in the root node we get NC2 and C2 samples in group A and the rest of the samples NC4, NC3, NC1, C1 in group B.[src] Disregarding the mutation chosen for the root node, proceed to place the next best features that have the highest values for information gain or the phi function in the left or right child nodes of the decision tree.[src] Once we choose the root node and the two child nodes for the tree of depth = 3 we can just add the leaves.[src] The leaves will represent the final classification decision the model has produced based on the mutations a sample either has or does not have.[src] The left tree is the decision tree we obtain from using information gain to split the nodes and the right tree is what we obtain from using the phi function to split the nodes.[src] Now assume the classification results from both trees are given using a confusion matrix.[src] Information gain confusion matrix: Phi function confusion matrix: The tree using information gain has the same results when using the phi function when calculating the accuracy.[src] When we classify the samples based on the model using information gain we get one true positive, one false positive, zero false negatives, and four true negatives.[src] For the model using the phi function we get two true positives, zero false positives, one false negative, and three true negatives.[src] The next step is to evaluate the effectiveness of the decision tree using some key metrics that will be discussed in the evaluating a decision tree section below.[src] The metrics that will be discussed below can help determine the next steps to be taken when optimizing the decision tree.[src] ===Other techniques=== The above information is not where it ends for building and optimizing a decision tree.[src] There are many techniques for improving the decision tree classification models we build.[src] One of the techniques is making our decision tree model from a bootstrapped dataset.[src] The bootstrapped dataset helps remove the bias that occurs when building a decision tree model with the same data the model is tested with.[src] The ability to leverage the power of random forests can also help significantly improve the overall accuracy of the model being built.[src] This method generates many decisions from many decision trees and tallies up the votes from each decision tree to make the final classification.[src] There are many techniques, but the main objective is to test building your decision tree model in different ways to make sure it reaches the highest performance level possible.[src] \text{Accuracy} = (TP + TN)/(TP + TN + FP + FN) = (11+105)/ 162 = 71.60 \% Sensitivity (TPR – true positive rate): \text{TPR} = TP/(TP + FN) = 11/(11+45) = 19.64 \% Specificity (TNR – true negative rate): \text{TNR} = TN/(TN + FP) = 105/(105+1) = 99.06 \% Precision (PPV – positive predictive value): \text{PPV} = TP/(TP + FP) = 11/(11+1) = 91.66 \% Miss Rate (FNR – false negative rate): \text{FNR} = FN/(FN + TP) = 45/(45+11) = 80.35\% False discovery rate (FDR): \text{FDR} = FP/(FP + TP) = 1/(1+11) = 8.30 \% False omission rate (FOR): \text{FOR} = FN/(FN + TN) = 45/(45 + 105) = 30.00\% Once we have calculated the key metrics we can make some initial conclusions on the performance of the decision tree model built.[src] The accuracy that we calculated was 71.60%.[src] The accuracy value is good to start but we would like to get our models as accurate as possible while maintaining the overall performance.[src] The sensitivity value of 19.64% means that out of everyone who was actually positive for cancer tested positive.[src] If we look at the specificity value of 99.06% we know that out of all the samples that were negative for cancer actually tested negative.[src] When it comes to sensitivity and specificity it is important to have a balance between the two values, so if we can decrease our specificity to increase the sensitivity that would prove to be beneficial.[src] These are just a few examples on how to use these values and the meanings behind them to evaluate the decision tree model and improve upon the next iteration.[src] ==References== ==External links== Extensive Decision Tree tutorials and examples Gallery of example decision trees Gradient Boosted Decision Trees[src]

77 sentences · 77 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Decision tree." encyclopegia.org, 2026, https://encyclopegia.org/wiki/decision-tree. Accessed 25 November 2026.

Chicago

"Decision tree." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/decision-tree.

APA

encyclopegia.org. (2026). Decision tree. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/decision-tree

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Ti -Tree

stub · references available

Siberian Tree Frog

stub · references available

Olive-tree Warbler

stub · references available

Tree Pipit

stub · references available

Matschie's tree-kangaroo

stub · references available

phylogenetic tree

stub · references available

Gray-bellied pencil-tailed tree-mouse

stub · references available

Pallid Atlantic Tree-rat

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1376977833 · 0.5 · snapshot enwiki-001376977833

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.