필터 지우기
필터 지우기

how i can use confusion_matrix for result of image classification using knn?

조회 수: 1 (최근 30일)
youb mr
youb mr 2019년 11월 17일
답변: Ridwan Alam 2019년 11월 20일
Hello everyone.
I'm trying to classify an images containing two classes using a Knn classifer.
and would like to evaluate the performance using its confusion matrix. But how can I use it with the KNN classifier?
This is my code of KNN classifer
model=ClassificationKNN.fit(X,Y,'NumNeighbors',9);
[~,result1]=predict(model,x);
how i can use confusion_matrix in this situation

답변 (1개)

Ridwan Alam
Ridwan Alam 2019년 11월 20일
yhat = predict(model,x);
C = confusionmat(y,yhat)

Community Treasure Hunt

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

Start Hunting!

Translated by