Glossary · AI & Data

Decision Tree

A decision tree is a model that predicts outcomes by asking a sequence of yes or no questions about features, branching until it reaches a final answer.

Updated October 6, 2026

A decision tree is a machine learning model shaped like a flowchart. Each internal node tests a feature (for example "response time above 500 ms?"), each branch is an outcome of the test and each leaf gives a prediction. Trees can be used for classification and for regression.

Why it matters

Decision trees are easy to read and explain, handle mixed numeric and categorical data and need little preprocessing, which makes them a common first model and a building block for random forests and gradient-boosted trees. Their weakness is that a deep tree can memorise noise in the training data, so it is limited by depth, minimum samples per leaf or pruning.

Example

if error_rate > 5%:
    if latency_ms > 800: predict "outage"
    else:                predict "degraded"
else:
    predict "healthy"

The learning algorithm chooses each split by picking the question that best separates the classes, for example by reducing Gini impurity or entropy.

Common mistakes

  • Growing a tree with no depth limit, which overfits.
  • Assuming a single tree is stable. Small data changes can produce a different tree.
  • Treating its explanations as causal rather than predictive.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.