The reason for this behaviour is that the ksmooth
function in R has a different scaling for different kernels (see the source code), while scikit-fda simply divides by the passed bandwith before applying the kernel. You can obtain the same results as in R if you multiply the smoothing_parameter
by 0.3706506
(for a normal kernel) or by 0.5
(for a box kernel; notice that this kernel can also be used in scikit-fda passing the parameter kernel=skfda.misc.kernels.uniform
).
Disclaimer: I am the maintainer of scikit-fda. Sorry for my late answer but I am not notified when a question mentioning it appears in this page. If you have future questions regarding the package, you can try opening an issue or a discussion. I am notified of these and usually can answer in a few hours or days.
CLICK HERE to find out more related problems solutions.