Question: Q 2 ( 4 0 pts ) : Consider a dataset used by a retail company to predict whether a customer will make a purchase

Q2(40 pts): Consider a dataset used by a retail company to predict whether a customer will make a purchase based on three features:
Table 1: Customer Purchase Dataset
Questions:
(a) Calculate the entropy of the target variable (i.e., the entropy of the entire dataset). Show all steps in your calculation. [5 points]
(b) Calculate the entropy of the target variable for each value of Age Group, Income Level, and Online Activity. Show all steps in your calculation. [20 points]
(c) Based on the entropy calculations from parts (a) and (b), construct a decision tree by choosing the feature that provides the highest information gain. Show the steps taken to select the best feature and draw the decision tree. [15 points]
Proof:
Q 2 ( 4 0 pts ) : Consider a dataset used by a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!