[SciPy-user] cdf and integration for multivariate normal distribution in stats.kde

josef.pktd@gmai... josef.pktd@gmai...
Fri Mar 20 09:55:37 CDT 2009

On Fri, Mar 20, 2009 at 9:34 AM, Dave <dave.hirschfeld@gmail.com> wrote:
>  <josef.pktd <at> gmail.com> writes:
>> On Sat, Jan 10, 2009 at 9:35 PM, Robert Kern <robert.kern <at> gmail.com>
> wrote:
>> > On Sat, Jan 10, 2009 at 20:29,  <josef.pktd <at> gmail.com> wrote:
>> >> I found the fortran code for rectangular integration of the
>> >> multivariate normal distribution in stats kde, which can be used to
>> >> calculate the cdf.
>> >>
>> >> I didn't see this function exposed anywhere in scipy. Did I miss it?
>> >
>> > No, I didn't expose it. Not for any particular reason; it's just that
>> > the only use case I had was the KDE stuff.
>> >
>> I will add it to stats.distributions when I find time to clean it up
>> and add tests.
>> mvn cdf will be useful to construct normal copulas.
>> Josef
> I'm currently using the mvncdf.py code you posted to the list but unless I'm
> mistaken it hasn't made the cut for 0.7 and there's no enhancement ticket for
> it in trac. It's a very useful function for me (and others I'm sure) so it
> would be a shame for it to just be forgotten as an list attachment. Should I
> file an enhancement ticket?

I'm glad you find it useful.

I had added the ticket: http://projects.scipy.org/scipy/ticket/846
but there was a typo in the title/summary so searching for
"multivariate" didn't find it.

Since you seem to be the first user of it, can you provide any
comments on the API. Are the functions useful in the way they are, or
what changes would yo recommend? You could add some comments to the
trac ticket.

I wrote these functions pretty fast and they need a review before they
can be included.
With the random number generator in numpy and this cdf, we would have
most elements for a full multivariate normal class, but in this
ticket, I just wanted to make it easier to access the fortran code.



More information about the SciPy-user mailing list