In the previous recipe, we trained an SVM based on the training dataset. The training process finds the optimum hyperplane that separates the training data by the maximum margin. We can then utilize the SVM fit to predict the label (category) of new observations. In this recipe, we will demonstrate how to use the
predict function to predict values based on a model trained by SVM.
You need to have completed the previous recipe by generating a fitted SVM, and save the fitted model in model.
Perform the following steps to predict the labels of the testing dataset: