Git Product home page Git Product logo

Comments (2)

dmetivie avatar dmetivie commented on June 12, 2024

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.

alegresor avatar alegresor commented on June 12, 2024

Thank you for the quick response. I'll close this issue and monitor the other one you linked.

from quasimontecarlo.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.