MATLAB Answers

Search window in KNN

조회 수: 1(최근 30일)
Orr Streicher
Orr Streicher 2021년 5월 5일
댓글: Orr Streicher 2021년 5월 12일
Hi,
I have a data marix D in size of Nxd where N is the number of samples (lets say 50,000) and d is a sample dimention (lets say 10)
I would like to perfome a KNN search over the sample but with "search window" that means for each sample i want to find its KNN but only among the C closet samples in D.
For example if K=3 and C=20, i would like to find the 3 NN of sample i among sample [i-10,i+10]
does anyone know how can i do it?
Thanks

답변(1개)

Sindhu Karri
Sindhu Karri 2021년 5월 12일
Hii,
Refer to the documentation of knnsearch function.This might help you in getting started
  댓글 수: 1
Orr Streicher
Orr Streicher 2021년 5월 12일
Hi,
Thanks for your respose. i use this function now but i want to try to improve my running time.
I can try to implement a function based on knnsearch that do "window search " with for loops, but i cant think on any efficient implementation and i wonder if some know an algorithem that do this thing.
To be more specific my data is overlap patches over an image- so i want to find the K-NN of each patch, but not all over the image, just in a seach window in size of 20x20 patches around the cuerrent patch

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by