pyod icon indicating copy to clipboard operation
pyod copied to clipboard

Support for KDE

Open hanshupe opened this issue 3 years ago • 3 comments

Is there any support for KDE (Kernel Density Estimation) based outlier detection planned?

hanshupe avatar May 01 '21 10:05 hanshupe

I think this is a classical approach but have not been implemented in PyOD yet. before it is actually implemented, you may use HBOS which is sort of non-parameteric density estimation...much simpler tho

yzhao062 avatar May 19 '21 16:05 yzhao062

How would that work? I have a little experience with KDEpy, which is a fast library for doing KDE. Do you want to measure the density-score of a given point based on the Density Estimation? I might have something I can share with you for that :)

psmgeelen avatar Jun 01 '21 18:06 psmgeelen

Hi,

I have tried to implement KDE using pyod and scikit-learn:

  • class definition https://gist.github.com/tam17aki/480a2c3155e1e06d59231c8f5eac65f4

  • notebook for example https://gist.github.com/tam17aki/8bd3b6f5fe0091c29f61358a2cc00f6e

I hope this code will help those who try to incorpolate it into the official pyod package.

Best regards, Akira Tamamori

tam17aki avatar Aug 09 '21 12:08 tam17aki