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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Sergio Rojas
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
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Q: on scipy probplot user defined distribution function

Paul Hobson-2
Sergio,

I haven't looked at scipy's probplot function in detail lately. But I think that as long as <dist>.pdf, .cdf, and .ppf work on arrays, you should be fine.

[shameless plug warning]
Here's an example of using different distributions with the mpl-probscale package:

-Paul


On Mon, Jul 2, 2018 at 11:40 AM Sergio Rojas <[hidden email]> 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
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user

_______________________________________________
SciPy-User mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Q: on scipy probplot user defined distribution function

Sergio Rojas

> 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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Q: on scipy probplot user defined distribution function

Paul Hobson-2
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]
[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 <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user

_______________________________________________
SciPy-User mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/scipy-user