How to export a Classification Learner model into a Simulink block

In my Simulink model, I want a block which can classify 5 input signals into 7 class. I use the Classification Learner App and trained in fine KNN, but I don‘t know how export the training result into a Simulink block that I can use in my model. Just like when I train a neural network and use 'gensim' to obtain a Simulink block.

回答 (1 件)

Sean de Wolski
Sean de Wolski 2020 年 6 月 9 日

1 投票

I find it's easier to generate the code from the classification learner, copy out just the fit*() algorithm and retrain it to a model. Then save that model and then put that into a Simulink function like in this example: https://www.mathworks.com/help/stats/predict-class-labels-using-matlab-function-block.html
The output from classification learner directly is hard to use otherwise.

1 件のコメント

Vishal Sharma
Vishal Sharma 2020 年 7 月 24 日
Hi,
Can you suggest any other method to do this.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

製品

リリース

R2018a

質問済み:

2020 年 6 月 9 日

コメント済み:

2020 年 7 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by