I am currently computing the nearest neighbors ratio using pdist2 for two feature vectors, x and y. I am using pdist2 to get the distances and am then sorting the distances by column and computing column 1 / column2 for the nearest neighbors ratio. I thought it would be faster to use a k-d tree to do this. Is this possible using built in matlab function?
Asked
Active
Viewed 61 times
0
-
[KDTreeSearcher](http://mathworks.com/help/stats/kdtreesearcher-object.html)? – hbaderts Sep 21 '16 at 20:32
-
I tried it but it lowers my accuracy. Should I expect this? – Mr.Roboto Sep 21 '16 at 20:53
-
1So please edit your question to include a minimal example showing what you tried, and why that doesn't work for you. – hbaderts Sep 21 '16 at 21:18