vc1492a / PyNomaly

Anomaly detection using LoOP: Local Outlier Probabilities, a local density based outlier detection method providing an outlier score in the range of [0,1].

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.fit() fails if the sum of squared distances sums to 0

vc1492a opened this issue · comments

Due to division by zero. Should return mumpy array composed of 0s.

Use numpy / pandas test data. Return array of all 0 probability or issue warning and break?

Generated dummy integer and float data to confirm that the failure stems from the fact that the sum of square distances == 0. Identified the root cause to be that all of the neighborhood distances == 0 (which itself stems from the fact that the size of the neighborhood is too small). Will suggest to the user that the number of neighbors should be increased (RuntimeWarning).