Decision Trees Flashcards

(20 cards)

1
Q

What is a decision tree?

A

A flowchart-like model that makes predictions by asking binary questions on features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are decision nodes in a decision tree?

A

Points where the tree asks a question about a feature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are leaf nodes in a decision tree?

A

Endpoints of the tree that assign a class label or prediction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the role of edges in a decision tree?

A

They represent the outcome (True/False) of a decision node’s question.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does entropy measure in decision trees?

A

The level of disorder or impurity in the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the entropy when all data points belong to one class?

A

Zero — the data is perfectly pure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the entropy when classes are evenly split?

A

One — the data is maximally impure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the formula for entropy?

A

E(x) = -Σ P(i) log₂ P(i), where P(i) is the probability of class i.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is information gain in decision trees?

A

The reduction in entropy after splitting on a feature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the formula for information gain?

A

G(F) = E(S) - E(F)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What feature should a decision tree split on first?

A

The one with the highest information gain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does a high information gain mean?

A

The feature splits the data into more homogeneous groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do decision trees handle continuous features?

A

By testing split points between sorted values using midpoint thresholds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the first step to split a continuous feature?

A

Sort the values in ascending order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How are candidate split points chosen for continuous features?

A

By calculating midpoints between adjacent values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens at each candidate split for continuous features?

A

The data is divided into ≤ and > groups, and information gain is calculated.

17
Q

What is a limitation of decision trees shown in the flood example?

A

They can memorize training data and fail to generalize to physical reality.

18
Q

Why are decision trees considered high variance models?

A

They are sensitive to small data changes and prone to overfitting.

19
Q

What are some advantages of decision trees?

A

Easy to interpret, handles both numerical and categorical data, no need for scaling.

20
Q

What are some disadvantages of decision trees?

A

Prone to overfitting, sensitive to noisy data, biased toward features with many levels.