[SciPy-Dev] adding trapezoidal integration equivalent to logsumexp

Matthew Pitkin matthew.pitkin at glasgow.ac.uk
Fri Feb 5 17:20:30 EST 2016


I'm thinking about pdfs that I've calculated myself rather than pdfs of 
known distributions within scipy, so they won't have a defined CDF.

Regards,

Matt

On 04/02/16 18:15, Thomas Haslwanter wrote:
>
> Why don't you use CDF?
>
> On Feb 4, 2016 3:22 PM, "Matthew Pitkin" <matthew.pitkin at glasgow.ac.uk 
> <mailto:matthew.pitkin at glasgow.ac.uk>> wrote:
>
>     Dear SciPy-dev list,
>
>     I often require using trapezoidal integration of probability
>     distribution functions (pdfs). For numerical reasons it is
>     generally best to compute the logarithm of the pdfs, so
>     integrating them whilst staying in log-space is generally
>     required. Provided the steps between points are equal the
>     scipy.misc.logsumexp function can be used for this, but I was
>     wondering if a function specifically for this purpose (and
>     following the usage of scipy.integrate.trapz function) might be
>     more generally useful (called e.g. logtrapz)? I have my own code
>     to do this, so if the list thinks this could be useful I can add
>     it into scipy and create a pull request.
>
>     Regards,
>
>     Matt
>
>     -- 
>     -----------------------------------------------------------
>     Matthew Pitkin
>     School of Physics and Astronomy
>     Kelvin Building
>     University of Glasgow
>     Glasgow, G12 8QQ
>
>     Tel. no. +44 (0)141 330 7168 <tel:%2B44%20%280%29141%20330%207168>
>     Mob. no. +44 (0)774 050 7792 <tel:%2B44%20%280%29774%20050%207792>
>     e-mail matthew.pitkin at glasgow.ac.uk
>     <mailto:matthew.pitkin at glasgow.ac.uk>
>     http://www.astro.gla.ac.uk/~matthew
>     <http://www.astro.gla.ac.uk/%7Ematthew>
>     -----------------------------------------------------------
>
>     _______________________________________________
>     SciPy-Dev mailing list
>     SciPy-Dev at scipy.org <mailto:SciPy-Dev at scipy.org>
>     https://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-dev

-- 
-----------------------------------------------------------
Matthew Pitkin
School of Physics and Astronomy
Kelvin Building
University of Glasgow
Glasgow, G12 8QQ

Tel. no.  +44 (0)141 330 7168
Mob. no.  +44 (0)774 050 7792
e-mail    matthew.pitkin at glasgow.ac.uk
http://www.astro.gla.ac.uk/~matthew
-----------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20160205/af799e4e/attachment.html>


More information about the SciPy-Dev mailing list