kernel density

Bug #717511 reported by joep
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
statsmodels
In Progress
Undecided
Mike Crowe

Bug Description

I need a kde estimator for quick check of residuals, univariate is enough for diagnostic checks on residuals, but I need to be able to experiment with the bandwidth interactively.

Where is it?

Get the subclass of scipy.stats.gaussian_kde with bandwidth option into statsmodels, or change class in scipy.
sandbox/nonparametric needs testing

Mike Crowe (m-j-a-crowe)
Changed in statsmodels:
status: New → In Progress
Revision history for this message
Mike Crowe (m-j-a-crowe) wrote :

I'm looking into what the scipy kde object actually does - from what I can tell you have to subclass it to set your own bandwidth, which doesn't seem a very natural API to me.

On the one hand I'm reluctant to provide methods which already exist in scipy, but on the other, the support in scipy.stats looks very thin.

I've already made KDR using arbitrary kernels/bandwidths, as well as a large selection of common kernels, and there already exists the startings of univariate kde code that someone else has written. So my plan is to bring together KDE and KDR to share the same kernel classes, and get the FFT version of KDE working.

Changed in statsmodels:
assignee: nobody → Mike Crowe (m-j-a-crowe)
Revision history for this message
joep (josef-pktd) wrote :

Thanks Mike,

The gaussian _kde comment was mostly directed to myself, I have the subclass (but misplaced) and an enhancement ticket for scipy.stats. Gaussian_kde only uses gaussian kernel, but works with an arbitrary number of dimension.

It doesn't overlap much with kde, kdr in statsmodels, which has a wider selection of kernel functions but is currently only univariate.

I wasn't sure what the status of kde in statsmodels is and I just used the default of gaussian_kde, but we need more options on bandwidth selection.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.