Skip to content
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

Support additional bandwidth estimation methods for KDEs #3794

Open
joelostblom opened this issue Sep 12, 2023 · 0 comments
Open

Support additional bandwidth estimation methods for KDEs #3794

joelostblom opened this issue Sep 12, 2023 · 0 comments
Labels
feature-request For requesting new features or transforms

Comments

@joelostblom
Copy link
Contributor

joelostblom commented Sep 12, 2023

Currently, Scott's rule of thumb is used to estimate the bandwidth for the kernel density estimates in vega. However, from my understanding, this is rarely the optimal choice. For data that can be assumed to be normally distributed, the Silverman rule of thumb appears to be preferred, and the safest choice without any assumption seems to be the Improved Seather & Jones algorithm (isj) which doesn't rely on the normality assumption and doesn't oversmooth multimodal data like Scott's and Silverman's rule does.

There is some more discussion in this blog post, comparisons in this report, and further examples in this notebook. There are Python implementations of isj in arviz, zfit, and KDEpy in case it is helpful.

@joelostblom joelostblom added the feature-request For requesting new features or transforms label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request For requesting new features or transforms
Projects
None yet
Development

No branches or pull requests

1 participant