フィルターのクリア

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