How do the multiclass SVM model function 'fitcecoc' work?
古いコメントを表示
Mdl = fitcecoc(X,Y)
Suppose I have 4 classes as below:

As seen from the table below, suppose for learner 1, the svm predicted it as Cat. For learner 2 it was predicted as Fish. For learner 3 it is predicted as Cat. For learner 4 it is predicted as Fish. For learner 5 it is predicted as Rabbit. For learner 6 it is predicted as Rabbit.

How do the ECOC svm determine if it is cat, fish or rabbit in this case?
回答 (1 件)
Dinesh Yadav
2020 年 3 月 9 日
0 投票
Kindly go through the documentation of fitcecoc and go through the sub sections Coding Design and Error Correcting Output Codes Model part to understand how it works.
4 件のコメント
tinkiewinkie
2020 年 3 月 9 日
Dinesh Yadav
2020 年 3 月 9 日
編集済み: Dinesh Yadav
2020 年 3 月 9 日
The above example is using one vs one SVM multiclass classification. One vs One classification works in a way lets say there are 4 classes, for each pair of classes there will be one binary learner. Therefore total no of binay learners is 4C2 i.e. (4x3)/2 = 6 (as shown in above case). +1 corresponds to belonging to that particular class and -1 says it does not belong to that class. With each +1 and -1 there is also a probability associated which is not shown here. So going by above example for one data point learner 1 and 3 says its a Cat, learner 2 and 4 says its a Fish and learner 5 and 6 says its a Rabbit. So whichever learner has the highest probability wins the final decision.
You can get the probabilty by computing the confusion matrix.
Hope it Clears your doubt.
tinkiewinkie
2020 年 3 月 9 日
Dinesh Yadav
2020 年 3 月 9 日
Sorry my bad it wont be probability but classification score. Also i have taken above data point as test data point not training. The score would be computed as in doc under Error Correcting Output Codes Model.
カテゴリ
ヘルプ センター および File Exchange で Classification Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!