1. Summertime approaches! After this semester's Artificial Intelligence course, brain power has gone to an all time low. You decide to give your brain a rest for the summer and let your computer "think" for you. Your first decision each morning is whether or not to go to the beach. You decide to program your computer, using decision trees, so that it can make this all important decision for you. Monitoring your daily beach activity results in the following set of training examples:
|
Day |
Outlook |
Temperature |
Humidity |
Wind |
Go to beach? |
|
D1 |
Sunny |
Hot |
High |
Weak |
Yes |
|
D2 |
Sunny |
Hot |
High |
Strong |
Yes |
|
D3 |
Overcast |
Hot |
High |
Weak |
Yes |
|
D4 |
Rain |
Mild |
High |
Weak |
No |
|
D5 |
Rain |
Cool |
Normal |
Strong |
No |
|
D6 |
Rain |
Cool |
Normal |
Weak |
No |
|
D7 |
Overcast |
Cool |
Normal |
Strong |
No |
|
D8 |
Sunny |
Mild |
High |
Strong |
Yes |
|
D9 |
Sunny |
Cool |
Normal |
Weak |
Yes |
|
D10 |
Rain |
Mild |
High |
Strong |
No |
|
D11 |
Overcast |
Hot |
High |
Strong |
No |
a) (4 points) Given the following formula for Entropy, replace the variables (pi ) in the equation with their appropriate values as given by the above table.
b) (5 points) If Entropy (S) = .994 and the formula for Information Gain is:

Entropy(Sunny) = 0
Entropy(Overcast) = .918
Entropy(Rain) = 0
What is the Information Gain for the attribute Outlook?
c) (3 points)You calculated the information Gain for each attribute and got the following results:
Gain (S, Humidity) = .151
Gain (S, Wind) = .048
Gain (S, Temperature) = .029
Gain (S, Outlook) = what you calculated in b
Which attribute labels the root node of the decision tree?
d) (5 points)The resulting decision tree is shown below.

What are the rules for deciding whether or not to go to the beach?
2. (15 points) A perceptron is given the following set of training examples.
|
x1 |
x2 |
result |
|
0 |
0 |
0 |
|
1 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
1 |
1 |

The equations for the Perceptron training rule is:

If h = .1 what are the values for w0 , w1 , w2 after one iteration of the perceptron training algorithm?
3. (6 points) Given the following simple two layer feed forward neural network, with two input, two hidden units and one output node, determine the output of the network if the weights are equal to the following values. The threshold function used by each unit is tanh. You only need to set up the equations. Do not solve them.

W13 = .4
W14 = .6
W23 = .3
W24 = .4
W35 = .4
W45 = .5