Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Zair Ahmedi
Zair Ahmedi el 26 de Jun. de 2019
Editada: Zair Ahmedi el 26 de Jun. de 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?

Respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by