regression model in simulink function block
5 次查看(过去 30 天)
显示 更早的评论
Hi everyone. I need your help please . now for more than two weeks I cannot resolve the issue I have. I have trained a model for regression in regression learner and I have exported the trained model to my workspace and saved it as required and I have created a function to predict as mentioned in matlab website but when I use it in the simulink function block It doesnt work I have tried all possible ways mentioned in matlab website. please help. thanks
2 个评论
Sulaymon Eshkabilov
2023-10-30
Some clarifcations are needed.
Q1: Can you share your model?
Q2: what simulink fcn were you trying to use?
Q3: what execise are you referring in MathWorks website or help documentation?
回答(1 个)
Drew
2023-11-3
MathWorks provides Simulink blocks for machine learning model prediction. So, rather than using a generic MATLAB function block for the model prediction, you can use the native Simulink block designed for model prediction for your machine learning model. Check the "Blocks" section of the doc page https://www.mathworks.com/help/stats/code-generation.html.
Given that your model is named "boosted_trees_model.mat", the matching Simulink block is probably the "RegressionEnsemble Predict" block:
- RegressionEnsemble Predict Predict responses using ensemble of decision trees for regression (Since R2021a)
If this answer helps you, please remember to accept the answer.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Regression Tree Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!