cost function in classification learner app

How is it possible to use a costfunction/ penalty function for a Support Vector Machine in the classification Learner App?
If it is not possible, is there a way to train a SVM manually for more than 2 classes?

 採用された回答

Stephan
Stephan 2018 年 5 月 8 日

0 投票

Hi,
a cost function is not available as far as i know. For more than two classes you could use the function
fitcecoc
see documentation here:
Best regards
Stephan

2 件のコメント

Artem Bykanov
Artem Bykanov 2018 年 5 月 9 日
Thanks for your answer!
Now I have another problem: In the classificationLearner App I can export a trained Model. (It is a 1x1 struct)
How can generate the same trained model? Because if I try to classify with fitcecoc and validate with crossval I dont get this 1x1 struct.
Best regards
Stephan
Stephan 2018 年 5 月 9 日
編集済み: Stephan 2018 年 5 月 9 日
Hi,
when you choose the option "generate code" from the button export model in the classification learner app you get a good commented script with matlab-code doing exactly what you choosed in classification learner app. Then you can modify for your purposes as you want. If you do SVM model with more than 2 classes, i guess the function classification learner will use
fitcecoc
See here for further information:
Best regards
Stephan

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

その他の回答 (0 件)

カテゴリ

質問済み:

2018 年 5 月 7 日

編集済み:

2018 年 5 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by