[SciPy-User] scipy.stats.gaussian_kde ppf?
Thu Aug 30 12:17:54 CDT 2012
On Thu, Aug 30, 2012 at 12:35 PM, Robert Kern <firstname.lastname@example.org> wrote:
> On Thu, Aug 30, 2012 at 5:15 PM, <email@example.com> wrote:
>> On Thu, Aug 30, 2012 at 12:41 AM, Serge Rogov <SergeRogov@minifab.com.au> wrote:
>>> Hi all,
>>> I need to compute confidence intervals from gaussian_kde, but I found that
>>> the ppf function is missing. I have implemented my own naïve version that
>>> precomputes the cdf for the kde and then performs a search for the desired
>>> probability, but it’s extremely slow and shows a bit of error when compared
>>> to norm.ppf even at large sample sizes. Has anyone had to do something like
>>> this before?
>> I've never seen a ppf for a kde.
>> gaussian_kde is multivariate, and I don't know if there is a
>> definition of ppf for multivariate distributions.
>> My guess is that there is nothing better than 2 rootfinding calls to
>> find the confidence interval for 1d (maybe with norm.ppf as starting
>> values if the distribution is approximately normal)
> You can invert the empirical CDF for a nicer starting value,
> regardless of distribution.
or even with a linear interpolation of the inverse empirical cdf,
which might already be in statsmodels.
> Robert Kern
> SciPy-User mailing list
More information about the SciPy-User