What is a decision tree?

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.

Copyright ©2024 Educative, Inc. All rights reserved