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!