[SciPy-User] Q: on scipy probplot user defined distribution function

Paul Hobson pmhobson at gmail.com
Thu Jul 5 03:11:52 EDT 2018


Hmm. I don't think scipy needs to know about your distribution per se. You
just need to be able to pass it to the probplot function via the `dist`
parameter. Per the docs (
https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.stats.probplot.html
):

scipy.stats.probplot(*x*, *sparams=()*, *dist='norm'*, *fit=True*,
*plot=None*)[source]
<http://github.com/scipy/scipy/blob/v0.14.0/scipy/stats/morestats.py#L296>
[snip]

*dist* : str or stats.distributions instance, optional

Distribution or distribution function name. The default is ‘norm’ for a
normal probability plot. Objects that look enough like a
stats.distributions instance (i.e. they have a ppf method) are also
accepted.

[snip]

On Wed, Jul 4, 2018 at 12:19 PM Sergio Rojas <sergio_r at mail.com> wrote:

>
> > Here's an example of using different distributions with the mpl-probscale
> > package:
> >
> https://matplotlib.org/mpl-probscale/tutorial/closer_look_at_viz.html#using-different-distributions-for-your-scales[https://matplotlib.org/mpl-probscale/tutorial/closer_look_at_viz.html#using-different-distributions-for-your-scales]
>
> > -Paul
>
> Thanks, Paul. I guess I might need to build a <dist>.pdf, .cdf, and .ppf
> files for my distribution. What is not clear is how to specify the
> alternative
> directory to make them available to scipy
>
> On Mon, Jul 2, 2018 at 11:40 AM Sergio Rojas <sergio_r at mail.com> wrote:
>
> > Hello folks,
> >
> > How can one specify our own (user made) probability distribution
> > function to scipy.stats.probplot ?
> >
> > Can it be done is the pdf used is not in a closed form function
> > (meaning that the random drawings comes from a numerical
> > procedure)?
> >
> > Salut,
> >
> >
> > Sergio
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User at python.org
> >
> https://mail.python.org/mailman/listinfo/scipy-user[https://mail.python.org/mailman/listinfo/scipy-user]
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/scipy-user/attachments/20180702/8522d0d0/attachment-0001.html[http://mail.python.org/pipermail/scipy-user/attachments/20180702/8522d0d0/attachment-0001.html]
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
>
> https://mail.python.org/mailman/listinfo/scipy-user[https://mail.python.org/mailman/listinfo/scipy-user]
>
>
> ------------------------------
>
> End of SciPy-User Digest, Vol 179, Issue 1
> ******************************************
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
> https://mail.python.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20180705/eee7e894/attachment.html>


More information about the SciPy-User mailing list