panlanfeng / KernelEstimator.jl

The julia package for nonparametric density estimate and regression
Other
26 stars 6 forks source link

support for custom kernels #11

Open gzheng92 opened 2 years ago

gzheng92 commented 2 years ago

I'd like to use my own kernel function, based on the one used here in opt_h.m. I'm unaware of a name for it, but the expression is

15/16 * (1-u^2)^2 * (abs(u) <= 1)

This is easy enough to code up, but bwlocalconstant is structured so that choice of h0, hlb, hub are hard-coded depending on the choice of kernel.

I can get around the issue by defining my own version of bwlocalconstant, but it might be more robust to fix it in the package so that others can also use their own kernels