Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendations for Low Discrepancy (e.g. Sobol) quasi-random sequences in Python/SciPy?

I would like to use a quasi-random sequence, specifically Sobol, within a SciPy based simulation. Any recommendations on existing, efficient packages?

like image 229
Bryan P Avatar asked Feb 23 '12 11:02

Bryan P


2 Answers

PyTorch provides some options now. One of them is scrambled sobol number generator that can generate quasi random number of higher dimensions of upto ~1k

https://pytorch.org/docs/stable/generated/torch.quasirandom.SobolEngine.html

Another option is to use Scipy that has this option now https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.qmc.Sobol.html

like image 130
toing Avatar answered Nov 06 '22 07:11

toing


Is this project any use? If not, the relevant Wikipedia article mentions C and Fortran routines in NAG and Numerical Recipes, which probably shouldn't be difficult to wrap or reimplement in Python. There are also C routines in GSL.

like image 23
James Avatar answered Nov 06 '22 05:11

James