Starting from:
$30

$24

Homework 7 Solution




(20 points) Imagine we have an agent on a retail website. The agent is trying to predict which customers will respond to a particular advertised special (so that the website can tailor ads to customers). Suppose we have the following data showing attributes of customers who have and have not responded to the special so far, and we want to try to learn a decision tree over this data to predict if a customer will respond to the ad. DO NOT construct the entire decision tree - just provide the first "top level" splits of this data and then indicate which question should be the first question asked.



Purchased
Purchased
Has Facebook
Has Premium Account?
Responded to Ad?
Related Book A?
Related Book B?
Account?














yes
no
yes
yes
yes










yes
no
no
yes
no










yes
no
no
yes
no










yes
yes
yes
yes
yes










yes
no
no
no
yes










no
no
yes
no
no










no
yes
no
no
no










no
no
no
no
no










no
yes
yes
no
yes










no
no
no
no
no













(30 points) Suppose we are attempting to train a perceptron to perform a few logical operations on some variables. For the tables below, each xn is an input to the perceptron and each y is the correct output label. Starting from initial weights of zero, and using a learning rate of 1.0, perform the perceptron weight update computation for the following data until the weights converge (i.e. the weights stop changing). For each table, show the steps for the first epoch of calculations of the perceptron weight update algorithm, and provide the final weights for the first epoch. Then also show the weights you have at the end of each epoch after the first until your weights converge to a solution and indicate how many epochs it took to reach a solution. Remember - an epoch is one pass through all of the samples. (You may want to write a program or use a spreadsheet for these calculations - that's fine, as long as you show your work for the first epoch of each and show what the weights are after each epoch).












x2 && (x1 || x3)






x1
x2


x3
y
























0


0


0


0
























0


0


1


0
























0


1


0


0
























0


1


1


1


























1


0


0


0





















































11/14/2018 Homework 7




1
0
1
0








1
1
0
1








1
1
1
1




















(x1 && x2) || (x2 && x3) || (x1 && x3)








x1


x2




x3


y






































0


0




0




0






































0


0




1




0






































0


1




0




0






































0


1




1




1










































1


0




0




0






































1


0




1




1










































1


1




0




1










































1


1




1




1


























































































(x1 && x2) - x3
















































x1


x2
x3
y






































0


0




0




1










































0


0




1




1










































0


1




0




1










































0


1




1




1










































1


0




0




1










































1


0




1




1










































1


1




0




0








































1


1




1




1




































































More products