Do NOT use evalsvm() for Problem 7.7 since evalsvm() uses cross-validation on the training data for model selection; however, we have independent validation data set in this problem.
Use smo() and svmclass(), instead.
To train the SVM classifier with linear kernel, use model = smo(data, struct('ker’, 'linear’,'C’, c))
where data follows the same structure (or format) described in here, and c is the value of the regularization parameter .
To make predictions on the given data, use ypred = svmclass(data.X, model)