tommyod / KDEpy

Kernel Density Estimation in Python
https://kdepy.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
584 stars 90 forks source link

Using bandwidth matrices for bivariate FFTKDE #157

Open Kaiyangshi-Ito opened 1 year ago

Kaiyangshi-Ito commented 1 year ago

Hi, I wonder if it's possible to use a user-specified bandwidth matrix for bivariate FFTKDE? Is it easy to modify the code to achieve this? Thanks.

Edit: I should introduce this paper on FFTKDE for non-diagonal bandwidth matrices:

https://www.tandfonline.com/doi/full/10.1080/10618600.2016.1182918

or the open access version:

https://arxiv.org/abs/1508.02766

tommyod commented 1 year ago

It's not possible today. It's probably not easy, but not very hard either if the paper is clear and good. It will require refactoring parts of the library to extend current functionality. Perhaps a new class is the way to go.

Thanks for the link to the paper, I was not aware of it.

I won't investigate this myself, but I will accept a pull request for this if the resulting code is clean and good.