-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Division by Zero in LocalOutlierFactor #334
Comments
Changing to use an |
dmnc
added a commit
to dmnc/ML
that referenced
this issue
May 22, 2024
This was referenced May 22, 2024
andrewdalpino
pushed a commit
that referenced
this issue
May 23, 2024
Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
LocalOutlierFactor
anomaly detector sometimes sets the k-distance toINF
at https://github.com/RubixML/ML/blob/master/src/AnomalyDetectors/LocalOutlierFactor.php#L215.Then, when using contamination and running
localReachabilityDensity
we take a max of the k-distances https://github.com/RubixML/ML/blob/master/src/AnomalyDetectors/LocalOutlierFactor.php#L317 and divide 1 by it, giving zero.Lastly, this zero is used for division at https://github.com/RubixML/ML/blob/master/src/AnomalyDetectors/LocalOutlierFactor.php#L295 which gives a division by zero error.
I'm struggling to understand why I ended up with the infinite k-distance, and if it is a problem (or a peculiarity) with my data, but I keep running into this issue.
The text was updated successfully, but these errors were encountered: