question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENH: stats: adding more random number generators from UNU.RAN

See original GitHub issue

UNU.RAN contains many generators to sample from univariate continuous and discrete distributions. gh-14215 adds two such generators TransformedDensityRejection and DiscreteAliasUrn. Over time it would be great to add these generators to SciPy:

For continuous distributions:

  • NumericalInversePolynomial (#14619)
  • NumericalInverseHermite (#14703)
  • NumericalInversion
  • AutomaticRatioUniforms
  • NaiveRatioUniforms
  • SimpleRatioUniforms (#15142)
  • AdaptiveRejectionSampling
  • InverseTransformedDensityRejection
  • SimpleSetupRejection
  • TransformedDensityRejection (#14215)
  • UniversalTransformedDensityRejection
  • PiecewiseConstantHatsTable

For discrete distributions:

  • DiscreteAutomaticRejectionInversion
  • DiscreteAliasUrn (#14215)
  • DiscreteGuideTable (#14828)
  • DiscreteSimpleRatioOfUniforms
  • DiscreteSequentialSearch

More details of all these generators can be found in this spreadsheet.

Updated 25 October: some methods do not need to be added to SciPy, see https://github.com/scipy/scipy/issues/14600#issuecomment-951174964

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisb83commented, Oct 3, 2021

@Kai-Striega It would be great if you help us!

gh-14717 should give a good overview of the required code changes to add a new method. Both Tirth and I noted that writing the docs / tutorial takes up most of the time (though one can copy quite a few things from UNU.RAN).

Tirth will soon work on SimpleRatioUniforms and I will implement AutomaticRatioUniforms. You can take a look at any of the other methods. I think DiscreteGuideTable would be nice to add (https://statmath.wu.ac.at/unuran/doc/unuran.html#DGT)

Let us know if you would like to have a virtual meeting to discuss this in more detail

1reaction
chrisb83commented, Feb 26, 2022

I will close this issue since we do not plan to add further methods for now

Read more comments on GitHub >

github_iconTop Results From Across the Web

UNU.RAN User Manual - Institute for Statistics and Mathematics
Uniform Random Number Generators: All generator objects need one (or more) streams of uniform random numbers that are transformed into random variates of...
Read more >
37. MONTE CARLO TECHNIQUES
Most Monte Carlo sampling or integration techniques assume a “random number generator,” which generates uniform statistically independent ...
Read more >
Entropy of Pseudo Random Number Generators - arXiv
Almost all random number generators calculate a new pseudo random number xi ... to the low entropy of the production rule f() conditioned...
Read more >
Integrate UNU.RAN in scipy.stats - Python GSoC - Blogs
2.4 Building SciPy with UNU.RAN. 3 Coding Proposal: Prototype ... for generating random numbers. ... RAN: 1. Create a new distribution.
Read more >
(PDF) Performance and Quality of Random Number Generators
Random number generation continues to be a critical com-ponent in much of computational science and the tradeoff between quality and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found