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].
Other
305 stars 36 forks source link

Performance boost to _euclidean method #9

Closed MichaelSchreier closed 6 years ago

MichaelSchreier commented 6 years ago

Using https://stackoverflow.com/a/47775357 as a base the euclidean distance function can be sped up (by a factor of ~2x on my machine) using np.dot rather than the naive approach. The other changes prevent an error when all input points are identical.

vc1492a commented 6 years ago

@MichaelSchreier Thanks! About a ~2.2x on my machine as well. This improvement will be incorporated into the next release.