Skip to content
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

KDLOF - Neighborhood cannot be empty #31

Closed
andrewdalpino opened this issue Jul 6, 2019 · 1 comment
Closed

KDLOF - Neighborhood cannot be empty #31

andrewdalpino opened this issue Jul 6, 2019 · 1 comment
Assignees
Labels
bug Something isn't working
Projects

Comments

@andrewdalpino
Copy link
Member

When training the k-d tree-based Local Outlier Factor (KDLOF), if the highest variance column has a heavy tail such that the median is the smallest value in the column, then the partition will result in one group that has no members - throwing the Neighborhood cannot be empty exception in the Neighborhood factory method.

The fix is simple, have the partition operation be inclusive of the column split value

@andrewdalpino andrewdalpino added the bug Something isn't working label Jul 6, 2019
@andrewdalpino andrewdalpino self-assigned this Jul 6, 2019
@andrewdalpino andrewdalpino added this to Backlog in Roadmap via automation Jul 6, 2019
@andrewdalpino andrewdalpino moved this from Backlog to In progress in Roadmap Jul 6, 2019
@andrewdalpino
Copy link
Member Author

This turned out to be an interesting fix because it gave me the opportunity to rethink the way that node splitting is done in our base k-d tree implementation. It turns out we can save alot of computation and still get fat splits (tight bounds) if we pick the axis as the column with the longest range (instead of highest variance) and the value as the midrange (instead of median).

Roadmap automation moved this from In progress to Completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Roadmap
  
Completed
Development

No branches or pull requests

1 participant