フィルターのクリア

How to create a matrix of the nearest neighbor for each test sample

1 回表示 (過去 30 日間)
Zair Ahmedi
Zair Ahmedi 2019 年 6 月 26 日
編集済み: Zair Ahmedi 2019 年 6 月 26 日
I was using the 'KDTreeSearcher' to find the nearest neghbour for a test data.
KDTreeSearcher
How do I create a matrix where the row is the test sample and the column to indicate that each particular test sample has neigbour to a particular training sample with the value of 1 or 0 (1=neigbbour, 0=not neghbour)?
Second, since I have the above matrix, I also wanted to create another to show the distance from each test sample to the neghbour, how do I do that?

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by