Question: 2 Decision Tree ( Theory ) ( Matthew ) - 1 0 pts In class, we primarily used information gain ( the overall reduction in
Decision Tree TheoryMatthew pts
In class, we primarily used information gain the overall reduction in entropy as the criterion for selecting
which feature to split on Another method would be to use the Gini index. For multiclass, the Gini index
is calculated as follows, where pk represents the fraction of samples in class k and p represents the set of all
probabilities pk:
Gini indexp
X
K
k
p
k
Consider a dataset comprising data points, with data points from class C data points
from class C and data points from class C Suppose that decision tree model A splits the data into
three leaves. Assume that the label distribution is at the first leaf, at the second
leaf, and at the third leaf, where n n n denotes the number of points from C C and
C respectively. Similarly, suppose that decision tree model B splits the data into at the first
leaf, at the second leaf, and at the third leaf. Answer the questions below,
showing all your work.
a Evaluate the misclassification rates for both decision trees and hence show that they are equal.
b Evaluate and compare the Weighted Gini index for the two trees which performs better in terms of
Weighted Gini index? The Weighted Gini index is calculated as:
Weighted Gini X
j
nj
N
Ginipj
where nj
N
is the weight of node j calculated as the proportion of data points nj in node j to the total number
of data points N Ginipj is the Gini index of leaf j and is the total number of leaves in the tree.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
