Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • $\begingroup$ Are you interested in knowing how KDE works on its own, given the bandwidth; or, how GridSearchCV decides on the best bandwidth? Your title and body ask different things I suppose. $\endgroup$ Commented Apr 27, 2019 at 10:52
  • $\begingroup$ @gunes: well, I want to know how KDE works. Or KernelDensity(). But I am also interested in knowing if my understanding of GridSearchCV is correct. Do you ask me to alter my question? $\endgroup$ Commented Apr 27, 2019 at 11:44
  • $\begingroup$ kde.py does not really do any bandwidth estimation; it uses a default value. The "big thing" it does is having an efficient way of finding the neighbours. Given that we have the proximity of the data-points in question we then place the Gaussian (or whatever kernel) on top. $\endgroup$ Commented Apr 27, 2019 at 11:50
  • $\begingroup$ @usεr11852: Can you explain the idea behind how kde finds its neighbours? $\endgroup$ Commented Apr 27, 2019 at 11:53
  • 1
    $\begingroup$ By default it is the kd_tree algorithm. $\endgroup$ Commented Apr 27, 2019 at 11:56