How to use a KNN classifier from Matlab in c++

4 vues (au cours des 30 derniers jours)
deams
deams le 29 Mai 2017
Hi,
I have been tinkering with the machine learning toolbox in Matlab for a while. Now that I managed to get a good classifier, I would like to test it out of the lab. I was happy to see that Matlab has a built-in code generation tool, but it seems that KNN classifiers are not included.
How would I go about using the trained KNN from Matlab in a c++ program?
Would I have to write my own KNN implementation and use the parameters from the trained one in Matlab? If so, is there such an implementation already?

Réponses (1)

Bernhard Suhm
Bernhard Suhm le 20 Sep 2018
Little late, but with MATLAB Coder you can convert a prediction function for KNN to C/C++ code, and then use that with your other code for feature extraction (which you could write in MATLAB also, and then convert - for supported functions).

Community Treasure Hunt

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

Start Hunting!

Translated by