The Sheather-Jones method for selecting an appropriate bandwidth for kernel density estimation generally produces better results than simpler methods such as Silverman's rule of thumb and Scott's variant of this rule of thumb, both of which give bandwidths which are generally too large. I use the Sheather-Jones method frequently in R but I'm looking for an implementation in Java. Is anyone aware of such an implementation? I have been unable to find one online.

The paper describing the method is here.

  • $\begingroup$ looking at the source of sm::hsj the function looks pretty easy to rewrite in JAVA...is there any reason you are not doing it? $\endgroup$
    – user603
    Jan 8 '13 at 20:06
  • $\begingroup$ To rewrite sm::hsj I'd also have to rewrite sm::sj, sm::hnorm, and sm::wvar. This would probably take me the better part of a day to get it debugged and working properly and I don't want to do this if I can avoid it. $\endgroup$
    – James King
    Jan 8 '13 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.