Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
Zair Ahmedi
Zair Ahmedi am 26 Jun. 2019
Bearbeitet: Zair Ahmedi am 26 Jun. 2019
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?

Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by