Docsity

Homework #4 Problems - Artificial Intelligence | CAP 4621, Assignments of Computer Science

Toggle sidebar
bg1
Homework 4
This assignment is due on Monday, December 13, 2004. I will be in my office,
E360, till 6:30pm on that day. Slide your solution under the door if I am not in.
The assignment is again somewhat longer than the previous three assignments.
However, this time, we have not yet covered about half of the assignment. Never-
theless, you are advised to start working on it immediately, particularly, the first
six problems. Read the relevant sections of the textbook carefully and thoroughly
before attempting the problems. Remember that solving most of these problems
do require non-trivial amount of thought and effort. Send me (or TA) emails if
you need clarifications, hints, etc.. Each problem is equally weighted. As always,
show all works in order to maximize your score.
Problem 1 โ€“ Bayesian Networks
Just for practice. Consider the following Bayesian Network, where variables A-D
are all Boolean-valued:
a)What is the probability that all four of these Boolean variables are simultane-
ously true?
b)What is the probability that Cand Bare true and Dis false?
(c) What is the probability that Cis true given that Dis false and Bis true?
1
pf3
pf4

Partial preview of the text

Download Homework #4 Problems - Artificial Intelligence | CAP 4621 and more Assignments Computer Science in PDF only on Docsity!

Homework 4

This assignment is due on Monday, December 13, 2004. I will be in my office, E360, till 6:30pm on that day. Slide your solution under the door if I am not in. The assignment is again somewhat longer than the previous three assignments. However, this time, we have not yet covered about half of the assignment. Never- theless, you are advised to start working on it immediately, particularly, the first six problems. Read the relevant sections of the textbook carefully and thoroughly before attempting the problems. Remember that solving most of these problems do require non-trivial amount of thought and effort. Send me (or TA) emails if you need clarifications, hints, etc.. Each problem is equally weighted. As always, show all works in order to maximize your score.

Problem 1 โ€“ Bayesian Networks

Just for practice. Consider the following Bayesian Network, where variables A-D are all Boolean-valued:

a)What is the probability that all four of these Boolean variables are simultane- ously true?

b)What is the probability that C and B are true and D is false?

(c) What is the probability that C is true given that D is false and B is true?

Problem 2 โ€“ Decision Trees (Problem 18.5 on page 676)

Suppose we generate a training set from a decision tree and then apply decision- tree learning to that training set. Is it the case that the learning algorithm will eventually return the correct tree as the training set size goes to infinity? Why or why not?

Problem 3 โ€“ Learning (Problem 18.7 on page 676)

Suppose you are running a learning experiment on a new algorithm. You have a data set consisting of 25 examples of each of two classes. You plan to use leave- one-out cross validation. As a baseline, you run your experimental setup on a simple majority classifier. (A majority classifier is given a set of training data and then always outputs the class that is in the majority in the training set, regardless of the input.) You expect the majority classifier to score about 50% on leave-one-out cross validation, but to your surprise, it scores zero. Can you explain why?

Problem 4 โ€“ Learning (Problem 18.8 on page 676)

In the recursvie construction of decision tress, it sometimes happens that a mixed set of positive and negative examples remains at a leaf node, even after all the at- tributes have been used. Suppose that we have p positive examples and n negative examples.

  1. Show that the solution used by DECISION-TREE-LEARNING, which picks the majority classification, minimizes the absolute error over the set of the examples at the leaf.
  2. Show that the class probability p/(p + n) minimizes the sum of squared errors.

Problem 8 โ€“ EM (Problem 20.10 on page 760)

Consider the application of EM to learn the parameters for the network in Figure 20.10(a), given the true parameters in Equation (20.7).

  1. Explain why the EM algorithm would not work if there were just two at- tributes in the model rather than three.
  2. Show the calculations for the first iteration of EM starting from Equation (20.8).
  3. What happens if we start with all the parameters set to the same value p? (Hint: you may find it helpful to investigate this empirically before deriving the general result.)
  4. Write out an expression for the log likelihood of the tabulated candy data on page 729 in terms of the parameters, calculate the partial derivatives with respect to each parameter and investigate the nature of the fixed point reached in part (c).

Problem 9 โ€“ Neural Network

A: (Problem 20.11 on page 761) Construct by hand a neural network that compute the XOR function of two inputs. Make sure to specify what sort of units you are using. B :(Problem 20.14 on page 761) Recall from Chapter 18 that there are 22 n distinct Boolean function of n inputs. How many of these are representable by a threshold perceptron?

Problem 10 โ€“ Support Vector Machine

Construct a support vector machine that computes the XOR function. It will be convenient to use values of 1 and โˆ’ 1 instead of 1 and 0 for the inputs and for the outputs. So an example looks like ([โˆ’ 1 , 1], 1) or ([โˆ’ 1 , โˆ’1], โˆ’1). It is typical to map an input x into a space consisting of five dimensions, the two original dimensions x 1 , and x 2 , and the three combination x^21 , x^22 and x 1 x 2. But for this exercise we will consider only the two dimensions x 1 , and x 1 x 2. Draw the four input points in this space, and the maximal margin separator. What is the margin? Now draw the separating line back in the original Euclidean input space.