필터 지우기
필터 지우기

how to find distance matrix using knnclassify in matlab?

조회 수: 2 (최근 30일)
Sahar abdalah
Sahar abdalah 2015년 4월 9일
댓글: Star Strider 2015년 4월 9일
I work in image classication and I used two classifiers : svm et knn. the problem is that the knnclassify matlab function allows only return a list of labels test images (class) and I need to get out the distance matrix
class = knnclassify( TestData , TrainData , TrainLabels);
please help me how can I find the distance matrix ?? and thanks in advance

채택된 답변

Star Strider
Star Strider 2015년 4월 9일
You likely have to use knnsearch to get the distances. See the documentation on Classification Using Nearest Neighbors for details.
  댓글 수: 4
Sahar abdalah
Sahar abdalah 2015년 4월 9일
thank you, that's exactly the answer
Star Strider
Star Strider 2015년 4월 9일
My pleasure! I’m glad it worked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by