Do NOT use evalsvm for Problem 1 since evalsvm did not partition the data the way we prefer for the cross-validation. Use smo and svmclass, instead. Also implement your own cross-validation.
To train the SVM classifier with polynomial kernel, use model = smo(data, struct('ker’, 'poly’, 'arg’, [q, 1], 'C’, c))
where q is the degree of the polynomial and c is the regularization parameter .
Note that we need q and 1 for the arguments. See help kernel in Matlab for more information.
To predict on the given data, use ypred = svmclass(data.X, model)