Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Zair Ahmedi
Zair Ahmedi le 26 Juin 2019
Modifié(e) : Zair Ahmedi le 26 Juin 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?

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by