Trusted answers to developer questions

What is a decision tree?

Get Started With Machine Learning

Learn the fundamentals of Machine Learning with this free course. Future-proof your career by adding ML skills to your toolkit — or prepare to land a job in AI or Data Science.

A decision tree is a type of supervised learning algorithm that can be used on categorical/continuous inputs and target variables.

 A decision tree based on categorical variables.
A decision tree based on categorical variables.

Types

1. Continuous Variable Decision Tree

A decision tree with a continuous target variable.

2. Categorical Variable Decision Tree

A decision tree with a categorical target variable.

Construction

Involves deciding what features to choose, which criteria to use for splitting, and when to stop the tree from growing further.

Advantages

  1. No domain knowledge is required to construct a decision tree.

  2. Decision trees are easy to interpret.

  3. Decision trees can handle continuous and categorical variables.

Disadvantages

  1. A decision tree is prone to overfitting. Overfitting occurs when a model’s performance on new data is hampered due to the extent of the detail and noise in the training data.

  2. Constructing a decision tree can be computationally expensive.

RELATED TAGS

ml
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?