Confusion matrix misclassification problem

I noticed that when one of the classes (complete testing set for one class) gets fully misclassified for other classes, the confusion matrix, instead of showing what it's been misclassified with, sets the whole class row to 0. I am using knn for the classification.

1 件のコメント

ANKUR KUMAR
ANKUR KUMAR 2018 年 10 月 3 日
Please attach your code.

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

 採用された回答

ANKUR KUMAR
ANKUR KUMAR 2018 年 10 月 3 日

0 投票

To get rid of singeton matrix, use squeeze or purmute.
A=randi(10,25,1,20);
size(A)
ans =
25 1 20
B=squeeze(A);
size(B)
ans =
25 20
C=permute(A,[1,3,2]);
size(C)
ans =
25 20

その他の回答 (0 件)

カテゴリ

質問済み:

2018 年 10 月 3 日

再開済み:

2018 年 12 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by