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.

 Respuesta aceptada

ANKUR KUMAR
ANKUR KUMAR el 3 de Oct. de 2018
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

Más respuestas (0)

Preguntada:

el 3 de Oct. de 2018

Abierta de nuevo:

el 22 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by