-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: modify KNN to also explore boundaries that do not contain the query point #1
base: main
Are you sure you want to change the base?
Conversation
pub latitude: NonNanFloat, | ||
} | ||
|
||
pub trait TCoordianteFloat { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conversion logic is already implemented for f64. Perhaps, Trait is not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to limit the types it can take.
self.search(&mut nearest_neighbors, query_point, k); | ||
|
||
nearest_neighbors | ||
.into_sorted_vec() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would the cost of into_sorted_vec
like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering the use case, it seems unlikely that we will need to use a large value for 'k'.
This will resolve the issue where the K-Nearest Neighbors algorithm cannot find points that are outside of the boundary to which it belongs.