Comments (2)
I believe this is caused by the “famous” debate about starting the Sobol sequence at zero (-> theory) or not (-> practical implementation).
QuasiMonteCarlo.jl
uses Sobol.jl
which use the latter convention (drop zero), see related issue and refs therein (Owen' paper).
This debate was started way back I believed and amplified with Pytorch using the drop zero solution. @fjhickernell probably knows better.
Meanwhile, a while ago, I ported the R Owen (@dcarrera you suggested that at some point) code to do scrambling in a package RandomizedQuasiMonteCarlo.jl.
There, you can find the implementation starting at zero.
Note: I don't maintain the package anymore since all its features have been moved in QuasiMonteCarlo.jl
(excepted the following function, in fact).
using RandomizedQuasiMonteCarlo
m = 2
N = 2^m # Number of points
d = 1 # dimension
b = 2 # always 2 for Sobol
M = 32 # number of bits to encode points
unrandomized_bits = sobol_pts2bits(m, d, M)
u_sobol = dropdims(mapslices(bits2unif, unrandomized_bits, dims=3), dims=3)
yields
4×1 Matrix{Rational{Int64}}:
0//1
1//2
1//4
3//4
I believe this convention should be specified somewhere in bold in Readme.md
and docs.
from quasimontecarlo.jl.
Thank you for the quick response. I'll close this issue and monitor the other one you linked.
from quasimontecarlo.jl.
Related Issues (20)
- https://github.com/SciML/QuasiMonteCarlo.jl/pull/50 breaks downstream HOT 2
- Remove `Distributions` from dependencies HOT 7
- Surrogates model breaks downstream HOT 4
- Base `b` Gray code
- Lazy iteration over points HOT 3
- Evenly distributed samples? HOT 6
- skip=n argument for parallelization? HOT 3
- Halton Sample not defined HOT 4
- Error in sample() usage HOT 3
- Incorrect Halton Sequence HOT 5
- Integrate QMCGenerators.jl Features
- Estimators and Statistics for RQMC Integraiton HOT 4
- Citation HOT 1
- Improve docstrings
- GridSample appears to sample on a line HOT 1
- Randomized Halton sequence? HOT 2
- use SafeTestsets HOT 1
- ERROR: UndefVarError: `UniformSample` not defined
- Caching in sampling to have `sample!`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quasimontecarlo.jl.