Decision tree learning
From Wikipedia, the free encyclopedia
Decision tree learning, used in data mining and machine learning, uses a decision tree as a predictive model which maps observations about an item to conclusions about the item's target value. More descriptive names for such tree models are classification trees or regression trees. In these tree structures, leaves represent classifications and branches represent conjunctions of features that lead to those classifications.
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 not decisions; rather the resulting classification tree can be an input for decision making. This page deals with decision trees in data mining.
Contents |
[edit] General
Decision tree learning is a common method used in data mining. The goal is to create a model that predicts the value of a target variable based on several input variables. Each interior node corresponds to one of the input variables; there are edges to children for each of the possible values of that input variable. Each leaf represents a value of the target variable given the values of the input variables represented by the path from the root to the leaf.
A tree can be "learned" by splitting the source set into subsets based on an attribute value test. 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 all has the same value of the target variable, or when splitting no longer adds value to the predictions.
In data mining, trees can be described also as the combination of mathematical and computational techniques to aid the description, categorisation and generalisation of a given set of data.
Data comes in records of the form:
(x, y) = (x1, x2, x3..., xk, y)
The dependent variable, Y, is the target variable that we are trying to understand, classify or generalise. The vector x is composed of the input variables, x1, x2, x3 etc., that are used for that task.
[edit] Types
In data mining, trees have additional categories:
- Classification tree analysis is when the predicted outcome is the class 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).
- Classification And Regression Tree (CART) analysis is used to refer to both of the above procedures, first introduced by Breiman et al.[1]
- CHi-squared Automatic Interaction Detector (CHAID). Performs multi-level splits when computing classification trees.[2]
- A Random Forest classifier uses a number of decision trees, in order to improve the classification rate.
- Boosting Trees can be used for regression-type and classification-type problems.[3][4]
[edit] Formulae
The algorithms that are used for constructing decision trees work by choosing a variable at each step that is the next best variable to use in splitting the set of items. "Best" is defined by how well the variable splits the set into subsets that have the same value of the target variable. Different algorithms use different formulae for measuring "best". This section presents a few of the most common formulae. These formulae are applied to each candidate subset, and the resulting values are combined (e.g., averaged) to provide a measure of the quality of the split.
[edit] Gini impurity
Used by the CART algorithm, Gini impurity is a measure of how often a randomly chosen element from the set would be incorrectly labelled if it were randomly labelled according to the distribution of labels in the subset. Gini impurity can be computed by summing the probability of each item being chosen times the probability of a mistake in categorizing that item. It reaches its minimum (zero) when all cases in the node fall into a single target category.
To compute Gini impurity for a set of items, suppose y takes on values in {1, 2, ..., m}, and let fi = the fraction of items labelled with value i in the set.

[edit] Information gain
Used by the ID3, C4.5 and C5.0 tree generation algorithms. Information gain is based on the concept of entropy used in information theory.

[edit] Decision tree advantages
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.
- Requires little data preparation. Other techniques often require data normalisation, dummy variables need to be created and blank values to be removed.
- Able to handle both numerical and categorical data. Other techniques are usually specialised in analysing datasets that have only one type of variable. Ex: relation rules can be used only with nominal variables while neural networks can be used only with numerical variables.
- Use a white box model. If a given situation is observable in a model the explanation for the condition is easily explained by boolean logic. An example of a black box model is an artificial neural network since the explanation for the results is difficult to understand.
- Possible to validate a model using statistical tests. That makes it possible to account for the reliability of the model.
- Robust. Performs well even if its assumptions are somewhat violated by the true model from which the data were generated.
- Perform well with large data in a short time. Large amounts of data can be analysed using personal computers in a time short enough to enable stakeholders to take decisions based on its analysis.
[edit] Limitations
- The problem of learning an optimal decision tree is known to be NP-complete.[5] Consequently, practical decision-tree learning algorithms are based on heuristic algorithms 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.
- Decision-tree learners create over-complex trees that do not generalise the data well. This is called overfitting[6]. Mechanisms such as pruning are necessary to avoid this problem.
- There are concepts that are hard to learn because decision trees do not express them easily, such as XOR, parity or multiplexer problems. In such cases, the decision tree becomes prohibitively large. Approaches to solve the problem involve either changing the representation of the problem domain (known as propositionalisation)[7] or using learning algorithms based on more expressive representations (such as statistical relational learning or inductive logic programming).
[edit] Extending decision trees with decision graphs
In a decision tree, all paths from the root node to the leaf node proceed by way of conjunction, or AND. In a decision graph, it is possible to use disjunctions (ORs) to join two more paths together using Minimum Message Length (MML)[8]. Decision graphs have been further extended to allow for previously unstated new attributes to be learnt dynamically and used at different places within the graph.[9] The more general coding scheme results in better predictive accuracy and log-loss probabilistic scoring. In general, decision graphs infer models with fewer leaves than decision trees.
[edit] See also
- Decision-tree pruning
- Pruning (algorithm)
- Binary decision diagram
- CART
- ID3 algorithm
- C4.5 algorithm
- Random forest
- Decision stump
- MARS: extends decision trees to better handle numerical data
- Incremental decision tree
- Alternating decision tree
[edit] Implementations
- Weka, a free and open-source data mining suite, contains many decision tree algorithms
- Orange, a free data mining software suite, module orngTree
[edit] External links
- decisiontrees.net Interactive Tutorial
- Building Decision Trees in Python From O'Reilly.
- Decision Trees page at aaai.org, a page with commented links.
- Bayesian Networks Applied in Real World Troubleshooting Scenario Dezide
- Practical Application of Decision Trees by Robin Barnwell
- Decision tree implementation in Ruby (AI4R)
- Machine Learning Thomas G. Dietterich Department of Computer Science, Oregon State University, Corvallis, OR 97331
- Decision Trees Tutorial Slides by Andrew Moore
[edit] References
- ^ 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-0412048418
- ^ Kass, G. V. (1980). "An exploratory technique for investigating large quantities of categorical data". Applied Statistics, 29, 119-127.
- ^ Friedman, J. H. (1999). Stochastic gradient boosting. Stanford University.
- ^ Hastie, T., Tibshirani, R., Friedman, J. H. (2001). The elements of statistical learning : Data mining, inference, and prediction. New York: Springer Verlag.
- ^ Constructing Optimal Binary Decision Trees is NP-complete. Laurent Hyafil, RL Rivest. Information Processing Letters, Vol. 5, No. 1. (1976), pp. 15-17.
- ^ doi:10.1007/978-1-84628-766-4
- ^ doi:10.1007/b13700
- ^ http://citeseer.ist.psu.edu/oliver93decision.html
- ^ Tan & Dowe (2003)