MATLAB: Saving and loading a Multiclass SVM Model

svm

I want to save a trained multiclass SVM and then load it to make predictions. How to do this?

Best Answer

Hi,
save the workspace with the trained model in it. If you want to make predictions in later matlab sessions just load the corresponding .mat-file with your model and add the new data to workspace for that you want to make predictions.
The prediction itself is done with the
label = predict(SVMModel,X)
command, where X is your data set on which you want to make a new prediction. See the documentation for predict command for examples how to do.
Best regards
Stephan