Question: Question 4 - Decision Trees [20 pts.] For this question, you are interested in modeling when a user clicks on an ad in a web
![Question 4 - Decision Trees [20 pts.] For this question, you](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e8ba8478a_32266f2e8ba0206e.jpg)
Question 4 - Decision Trees [20 pts.] For this question, you are interested in modeling when a user clicks on an ad in a web page. The data shown in the table below lists 12 data points: the first 10 ads are training data with labels (user clicked or not), while the last two are the test data. The first column in the table lists the ad id. The second column indicates the label, whether the user clicked on the ad or not. The remaining three attributes are as follows: Page Position specifies where the ad appears on the web page, Category indicates whether the item in the ad is electronics or clothing, Price Level indicates whether the item is cheap or expensive. You will try to determine whether the user will click on the online advertisement based on the attributes of the ad (PagePosition, Category, Price Level) by building a decision tree classifier. Table 3: Click prediction data. a [4 pts.] ) What is the initial entropy of clicked based on the training data? Show your work. b [6 pts.] ) Assume that PagePosition is chosen for the root of the decision tree. What is the information gain associated with this attribute? c [8 pts.] ) Draw the rest of the decision tree (root is PagePosition) learned for this data without any pruning using information gain as the purity criteria. (Hint: You may do this without any calculation.) d [2 pts.] ) Based on the decision tree you grow, what are the predicted labels for the 2 ads listed at the bottom of the table (Test 1 and Test 2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
