
CMPS 242 Third Homework, Fall 2006
Just exercises, not to be turned in.
1. Experiment with support vector classiļ¬cation in Weka on the Iris2 dataset. Use the
SMO algorithm. The complexity parameter is related to the complexity per iteration,
keep it at 1. Choose to standardize the data, and keep the low order terms. What
degree polynomial is needed to correctly classify the training set? Do the number of
support vectors grow as the degree is increased?
Use RBF (radial basis functions). How does the number of support vectors and accu-
racy change as a function of the gamma parameter (which controls the width of the
gaussians)?
2. Can linear support vector machines (without kernals) learn the XOR function? How
about polynomial kernals?
3. Run AdaBoost on the Iris2 data in Weka. How many iterations does it take to get to
training error zero?
4. Consider the following (unlabeled) sample where each instance contains three boolean
features. x1x2x3
0 1 1
1 0 1
1 1 0
1 1 1
1 0 0
0 1 0
First, assume we have two distributions, D2/3and D1/3,whereDpassigns probability
px1+x2+x3(1 āp)3āx1āx2āx3to the each instance (x1,x
2,x
3). In other words, each at-
tribute xiis given by independent ļ¬ips of a 0-1 valued coin where pis the probability
of 1. Calculate the probability of each instance under these two distributions. Cal-
culate the likelihood of the sample under the mixture (D2/3+D1/3)/2, corresponding
to the model where nature ļ¬rst ļ¬ips an unbiased coin to select which of the two Dp
distributions to use, and then generates an instance from that distribution.
Second, holding the distributions fixed use EM to learn the mixture coeļ¬cients (coin
bias) that maximize the likelihood of the sample. (I.e. for what αā[0,1] does
distribution αD2/3+(1āαD1/3) maximize the probability of generating the sample?
What is the likelihood of the sample under this optimal mixture? (You can run for 3
iterations rather than convergence if you prefer).
Third (optional): use EM to learn both the αvalues and the mixture proportions.