Skip to content

Conversation

@geosarr
Copy link
Contributor

@geosarr geosarr commented Nov 17, 2025

Multivariate density estimation

This PR implements density estimation from a sample using kd trees and nearest neighbors approach.

Bandwith is optionally provided by the caller.

@YeungOnion
Copy link
Contributor

This looks good, thanks for implementing!
As for knn wrapper on the tree and errors this seems good by me.

My only question is if you have some ideas on how you'd coordinate this with the Kernel trait to allow changing the kernel function from Gaussian?

@geosarr
Copy link
Contributor Author

geosarr commented Nov 17, 2025

I may generalize kde_pdf function by adding a kernel argument that implements Kernel trait. But I am not sure the output value converges to the true value if you change the gaussian kernel to another one, especially for multidimensional samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants