I've trained a linear SVM classifier using the Classification Learner app, and exported the model to a .mat file. I'm attempting to translate this algorithm to C using MATLAB Coder, but am getting an error.
I'm not sure if I'm approaching the problem correctly, but my current approach is to load the .mat file as I would do in MATLAB, and then call the classification prediction function using values that are passed in (this assumes that using load() would normally work in MATLAB Coder, of which I'm not sure). When running the "Check for issues" step in MATLAB coder, the following error is triggered:
Found unsupported class for variable using function 'load'. MATLAB class 'ClassificationSVM' found at 'classifier.trainedClassifier.ClassificationSVM' is unsupported.
Use the command 'whos -file classifierOptimal.mat' to view the variables in the MAT file.
It would appear that the MATLAB class used for classification is unsupported in MATLAB coder.
How do I translate this classification algorithm for use outside of MATLAB?