Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 . Decision Trees ( 1 5 marks ) ( a ) Explain how decision trees can be used to address regression and classification problems.

2. Decision Trees (15 marks)
(a) Explain how decision trees can be used to address regression and classification problems. [3 marks]
(b) Decision trees are trained by maximising the purity of the corresponding partition of the training data. Does the purity of a set depend on the attributes,
on the labels, or on both? Briefly describe how you evaluate the purity of the
partition associated with a given tree. [3 marks]
(c) Consider the following data set
D ={(xn, yn) in R
2\times {one, two, three, four, five}}4
n=1
={(x1, y1),(x2, y2),(x3, y3),(x4, y4)}
Choose y1,... y4 in {one, two, three, four, five} to maximize the purity of D.
[2 marks]
(d) Suppose you have trained a classification tree to predict Y ={yes, no}.
Explain how you can use a Bayes classifier and the estimated conditional
probability, Prob(Y |X), to predict the label of a test object.
Hint: In this case, a Bayes classifier based on Prob(Y |X) is
y= arg max
y in {yes,no}
Prob(Y = y|X)
[3 marks]
(e) A standard approach to building a decision tree is to perform iterative binary
splits of the input space. How do you find the optimal split at each iteration?
Give the formula of the information gain and explain how it depends on a
real-valued threshold.
Hint: The information gain is a function of the size and the entropy of
a bin before the split, B, and
the two bins, B1 and B2, you obtain after splitting B.
Let |D| be the cardinality of D. Then the entropy of D is
H(D)=
X
y in Y
py log py, py =|D|1 X
(x0
,y0) in D
1(y
0= y)
[4 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

osng mont 52. 33 02

Answered: 1 week ago