In the last part of the programming assignment, we're supposed to show how many of the support vectors lie within the margin hyperplanes. Shouldn't the margin be determined exactly by the distance of the support vectors to the separating hyper-plane? If so, aren't all the support vectors exactly on the edge of the margin (without even calculating the separating hyperplane itself)? Am I missing something important here?
Also, for the other students, two things that might help out -
1. The default value for gamma is not 1 by default, but can be set to 1 using -g -1.
2. The value of w is not returned by svmtrain or svmpredict, but the model which is the return value of svmtrain has the value of the alphas (sv_coef) which can be resourceful in that sense.