Load ML trained model objects in Simulink data dictionary
37 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
is there a way to load some ML learning trained regression/classification model objects in Simulink data dictionary, in order to call them in Simulink using the dedicated "Predict" block?
Thank you in advance.
0 Kommentare
Antworten (2)
Aditya
am 21 Nov. 2024 um 9:30
Hi Davide,
You can refer to the following MATLAB Answers post, as it closely matches your use case:
The post includes several examples demonstrating how to achieve the desired behavior in MATLAB.
Hope it helps!
Jaimin
am 26 Nov. 2024 um 9:07
Bearbeitet: Jaimin
am 26 Nov. 2024 um 9:08
You can import trained machine learning models into a Simulink data dictionary and utilize them with the “Predict” block in Simulink. Here is a general workflow to accomplish this:
- Train your regression or classification model in MATLAB using the appropriate toolbox, such as the Statistics and Machine Learning Toolbox or the Deep Learning Toolbox, and save the trained model object to a“.mat”file using the“save”function.
- Open your Simulink model, access the Simulink Data Dictionary, and import the “.mat” file with your trained model.
- Add the "Predict" block from the Simulink library to your model and configure it to use the loaded model by selecting it from the data dictionary.
- Connect inputs to the “Predict” block according to your model's requirements.
For more information kindly refer following MathWorks Documentation.
I hope this will be helpful.
Siehe auch
Kategorien
Mehr zu Predictive Maintenance Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!