ArticleslgStudy

computer science

Decision tree learning

Decision tree learning is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Decision tree learning rather than just read about it. In short: Decision tree learning is a 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.

Decision tree learning — main illustration
Decision tree learning — illustration

Key takeaways

  • Decision tree learning belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Decision tree learning to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Decision tree learning from memory before moving on to harder problems.

Reference excerpt

Decision tree learning is a 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. More generally, the concept of regression tree can be extended to any kind of object equipped with pairwise dissimilarities such as categorical sequences. Decision trees are among the most popular machine learning algorithms given their intelligibility and simplicity because they produce algorithms that are easy to interpret and visualize, even for users without a statistical background. 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).

General

Decision tree learning is a method commonly used in data mining. The goal is to create an algorithm 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. 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) is an example of a greedy algorithm, and it is by far the most common strategy for learning decision trees from data. 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:

(𝐱,Y)=(x1,x2,x3,...,xk,Y) The dependent variable, Y, is the target variable that we are trying to understand, classify or generalize. The vector 𝐱 is composed of the features, x1,x2,x3 etc., that are used for that task.

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

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. (1984). 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. Some techniques, often called ensemble methods, construct more than one decision tree:

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. Committees of decision trees (also called k-DT), an early method that used randomized decision tree algorithms to generate multiple different trees from the training data, and then combine them using majority voting to generate output. Bootstrap aggregated (or bagged) decision trees, an early ensemble method, builds multiple decision trees by repeatedly resampling training data with replacement, and voting the trees for a consensus prediction. A random forest classifier is a specific type of bootstrap aggregating Rotation forest – in which every decision tree is trained by first applying principal component analysis (PCA) on a random subset of the input features. A special case of a decision tree is a decision list, which is a one-sided decision tree, so that every internal node has exactly 1 leaf node and exactly 1 internal node as a child (except for the bottommost node, whose only child is a single leaf node). While less expressive, decision lists are arguably easier to understand than general decision trees due to their added sparsity, permit non-greedy learning methods and monotonic constraints to be imposed. Notable decision tree algorithms include:

… excerpt ends here. Continue reading the full article.

Illustrations

Decision tree learning: An example tree which estimates the probability of
kyphosis after spinal surgery, given the age of the patient and the
vertebra at which surgery was started.
The same tree is shown in three different ways.
Left The colored leaves show the probability of kyphosis after spinal surgery,
and percentage of patients in the leaf.
Middle The tree as a perspective plot.
Right Aerial view of the middle plot.
The probability of kyphosis after surgery is higher in the darker areas.
(Note: The treatment of kyphosis has advanced considerably since this rather small set of data was collected.[citation needed ])
An example tree which estimates the probability of kyphosis after spinal surgery, given the age of the patient and the vertebra at which surgery was started. The same tree is shown in three different ways. Left The colored leaves show the probability of kyphosis after spinal surgery, and percentage of patients in the leaf. Middle The tree as a perspective plot. Right Aerial view of the middle plot. The probability of kyphosis after surgery is higher in the darker areas. (Note: The treatment of kyphosis has advanced considerably since this rather small set of data was collected.[citation needed ])

Worked examples

Example 1 — a first encounter with Decision tree learning

Start with the simplest possible case. Write down what Decision tree learning claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Decision tree learning before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Decision tree learning ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Decision tree learning

In research
Decision tree learning appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Decision tree learning in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Decision tree learning is common in secondary-school and first-year university syllabi. It links to neighbouring topics Classification algorithms, Decision trees, Machine learning algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Decision tree learning outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Decision tree learning” →

How to study Decision tree learning in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Decision tree learning means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Decision tree learning out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Decision tree learning in simple terms?

Decision tree learning is a 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.

Why does Decision tree learning matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Decision tree learning?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Decision tree learning.

Tags

  • Classification algorithms
  • Decision trees
  • Machine learning algorithms

Keep exploring