do CDF inversion methods have to be public?
See original GitHub issue@chrisb83, @mdhaber, @tirthasheshpatel I had completely missed the API changes to add NumericalInverseHermite
and other public classes listed in http://scipy.github.io/devdocs/reference/stats.html#random-variate-generation-cdf-inversion. Was that discussed on the mailing list, and do these things have to be public?
My impression is that it’s a complex API that is quite unlike other APIs in scipy.stats
. They take distribution objects that are not the regular stats
distributions:
An instance of a class with pdf
and dpdf
methods.
It looks to me at first glance that this should be private infrastructure which supports improved RVS generation in the regular distribution classes?
Issue Analytics
- State:
- Created 2 years ago
- Comments:31 (31 by maintainers)
Top Results From Across the Web
quantiles - Inverse transform sampling - CDF is not invertible
Actually i am interested to learn about existing approaches to deal with the CDF, which is either not invertible, or hard to invert....
Read more >Inverse transform sampling - Wikipedia
Inverse transform sampling is a basic method for pseudo-random number sampling, i.e., for generating sample numbers at random from any probability ...
Read more >13.3 Sampling Random Variables - PBR Book
The inversion method uses one or more uniform random variables and maps them to random variables from the desired distribution. To explain how...
Read more >how to generate data from a distribution whose cdf is not in ...
You can do it the following way, using the inverse cdf method with the empirical cdf (don't need the analytically derived cdf):
Read more >scipy.stats.rv_continuous — SciPy v1.9.3 Manual
Public methods of an instance of a distribution class (e.g., pdf , cdf ) ... if the inverse cdf can expressed in an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Most distributions are unimodal. One could use the
optimize
submodule to find the mode of the PDF (even for bounded/truncated distributions) in that case. In other cases, one could either analytically calculate the mode or give a value close to the actual mode (i.e. approximate the mode).Yes, NaiveRatioUniforms offers the same functionality as a special case using the common interface that Tirth implemented .We initially wanted to deprecate
rvs_ratio_uniforms
after adding NaiveRatioUniforms. We then decided to wait since the former is still faster (about 6x if I remember correctly). We can still deprecate it right away in my view. For a lot of distributions, NumericalInverseHermite or NumericalInversePolynomial offer faster alternatives.