[SciPy-user] another gaussian_kde question

josef.pktd@gmai... josef.pktd@gmai...
Sun Apr 5 21:33:31 CDT 2009


On Sun, Apr 5, 2009 at 10:06 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Sun, Apr 5, 2009 at 20:46,  <josef.pktd@gmail.com> wrote:
>> Does anybody know what integrate_kde and integrate_gaussian in
>> stats.kde are good for? I was trying for a while to find out what they
>> can be used for, but so far without success.
>>
>>    def integrate_kde(self, other):
>>        """Computes the integral of the product of this kernel density estimate
>>        with another.
>>    def integrate_gaussian(self, mean, cov):
>>        """Multiply estimated density by a multivariate Gaussian and integrate
>>        over the wholespace.
>
> My particular use case at the time I wrote gaussian_kde involved a
> Bayesian model comparison. The computations required integrations of a
> KDE against a rectangular uniform distribution (hence mvndst), a
> Gaussian distribution, or another KDE.
>

Thanks,
Do you still have the reference for this? A hint for what the use
cases for the functions are would be useful in the docs.

I was also wondering whether it can be used for cross validation of
the bandwith, but I don't have the time right now to figure this out.
I'm just writing some tests in preparation for introducing a keyword
parameter as option for bandwith selection as we discussed a while
ago.
covariance factor, covfact = 'scotts', 'silverman' or a float (or
maybe float array (1,n) if I figure out how to have different
covariance factors by array dimension)

Josef


More information about the SciPy-user mailing list