Replies: 6 comments
-
No concrete plans so far from my side, but I'd certainly accept a pull request. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure where this should go but perhaps some variation of below? Got the reference from wikipedia https://en.wikipedia.org/wiki/Kernel_density_estimation public static double KDE(double at, IList<double> sample, double bandwidth)
{
return sample.Select(x_i => Normal.PDF(0, bandwidth, at - x_i)).Sum() / sample.Count();
} |
Beta Was this translation helpful? Give feedback.
-
I want this too. I'll try to come up with an API and make a proposal for that. |
Beta Was this translation helpful? Give feedback.
-
If somebody wants to discuss an API, I opened a PR, see above. In terms of functionality: So far, it supports 1D samples. What's still missing is some input checking (e.g. samples null or empty), corner-case testing and automatic bandwidth selection. |
Beta Was this translation helpful? Give feedback.
-
Thanks all for the proposal and first implementation. I've already pulled in the proposal, but refactored it a bit towards a simpler static and stateless API:
I have not included any functionality yet regarding bandwidth rules, but it seems we could support it nicely with overloads in the future. |
Beta Was this translation helpful? Give feedback.
-
An option would be to add |
Beta Was this translation helpful? Give feedback.
-
The title says it all really. Is anyone considering adding KDE functionality?
Beta Was this translation helpful? Give feedback.
All reactions