How do i export a classification score from SVM through MATLAB CODER?

Hi guys, i got an emergency now.
Could you give me a hand, please?
I've been doing on training SVM and it's all done.
Then I have to generate C code from all MATLAB code, which means i need the clssification score as well.
I do know how to get a confidence score from SVM in MATLAB, of course.
However, i cannnot figure out how to export the value of score to C using MATLAB coder.
As you see the picture i attached, if i generate that code as it is, it doesn't show the right output like it does in MATLAB.
Searching for document of 'predict', it is said in extension capability that
------------------------------------------------------------------------------------------------------------------------------------
Generate C/C++ code
You can use MATLAB® Coder™ to generate C code or C++ code.
Notes and restrictions on usage:
  • Syntax YPred = predict(net,X)Only supported.
---------------------------------------------------------------------------------------------------------------------------------------
Did i use it wrong? Is it not supported to use '[LABEL , SCORE]' in MATLAB coder?
Then how do i get the score ?? Do i have to another method or function?
Let me know how, please. I really ought to bring it to the C code and use it.
What function do you use when u guys export that value to other platform especially like C?

1 commentaire

Prasanth
Prasanth le 31 Déc 2020
Modifié(e) : Prasanth le 31 Déc 2020
Hello,
I am assuming that you are using MATLAB R2020b. It is possible to generate C code for 'predict' function for SVM Classifier with multiple output arguments.
This documentation page indicates the same.
Are you getting any errors while generating code for the code provided in the attached image?

Connectez-vous pour commenter.

Réponses (0)

Question posée :

le 17 Déc 2020

Modifié(e) :

le 31 Déc 2020

Community Treasure Hunt

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

Start Hunting!

Translated by