How do I use predict() on CompactClassificationNeuralNetwork and CompactClassificationEnsemble objects in 32 bit Matlab 2015b?
1 次查看(过去 30 天)
显示 更早的评论
I'm trying to use existing machine learning models to make predicitions based on sensor data in real time. Interfacing between the sensor and computer requires a 32 bit ADC, so the computer can use at best R2015b. I'm trying to find a way to perform the equivalent of
predict(model,data)
in R2015b. I thought to generate C/C++ code similarly to the "Generate C/C++ for Prediction" example in the LoadLearnerForCoder() documentation. However, since the C/C++ code must be generated on a 64 bit Matlab version, the mex file is 64 bit as well and can't be run in R2015b. Is there a way to tell LoadLearnerForCoder() to create a 32 bit mex file? Or is there a different approach I should take to getting an equivalent to predict() working in R2015b?
0 个评论
回答(1 个)
Akshat Dalal
2023-10-8
Hi Walden,
I understand you want to use the ‘predict’ function in R2015b. You can create a 32-bit DLL for the function. You can then use the ‘loadlibrary’ function to load and use the functions from the generated DLL in R2015b.
You can refer the following MATLAB Answer on how to create a 32-bit DLL on a 64-bit MATLAB version - https://in.mathworks.com/matlabcentral/answers/497234
You can refer the following documentation to learn more about the ‘loadlibrary’ function - https://in.mathworks.com/help/matlab/ref/loadlibrary.html
Hope this helps!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!