how to know which row is read in knn

1 回表示 (過去 30 日間)
Nana Fernandes
Nana Fernandes 2017 年 4 月 22 日
コメント済み: Nana Fernandes 2017 年 4 月 23 日
i have a code which runs knn and compares two excel sheets and give me the value whether its a fault or not. i want to know which row of my excel sheet is helping it determine whether its a fault or not a fault
Thanks in advance

採用された回答

Image Analyst
Image Analyst 2017 年 4 月 22 日
It depends on which rows are the reference and which are the unknown data to be classified. The row being used to determine the class of some test/unknown points is the reference data. The knnsearch() function looks at the k nearest neighbors of your test point and gets the distances to them. You can consider the test point as belonging to the class that has the most points next to your test point. I illustrate that in my attached demo.
  1 件のコメント
Nana Fernandes
Nana Fernandes 2017 年 4 月 23 日
Thanks it helps

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by