How can I implement SVM classification function on embedded platform after it has been trained in MATLAB.

1 view (last 30 days)
I have trained SVM with training data using the fitcsvm() function. SVMModel = fitcsvm(X,y,'KernelScale',.5,'Standardize',true,'OutlierFraction',0.05); with output: SVMModel =
ClassificationSVM
PredictorNames: {'x1' 'x2'}
ResponseName: 'Y'
ClassNames: 1
ScoreTransform: 'none'
NumObservations: 900
Alpha: [460x1 double]
Bias: -28.3591
KernelParameters: [1x1 struct]
Mu: [0.6169 0.1173]
Sigma: [0.1381 0.0132]
BoxConstraints: [900x1 double]
ConvergenceInfo: [1x1 struct]
IsSupportVector: [900x1 logical]
Solver: 'SMO'
I am satisfied with the results of predict() function, implemented as:
[~,score] = predict(SVMModel,[X1(:),X2(:)]);
Now I want to calculate the score of an individual sample on an embedded platform with limited resources. How may I program the SVM-Model as well as the classification function on a system with say, 1 MegaBytes maximum ram memory?
It is also not clear how may I know the parameters like 'Alpha' and 'Bias' as these will be needed when writing the classification function.
I have no training in machine learning and therefore I have only minimum understanding of the technicalities of SVM algorithm. Apologies if the question seems to naive.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!