qmc · point lab

GO · WEBASSEMBLY · NO JS SEQUENCE

Two dimensions out of thirty-nine

Halton places its d-th coordinate by the radical inverse in base pd, the d-th prime. For a large base the first pd points of that coordinate are just 0, 1/p, 2/p, … — a ramp, not a sample. Two adjacent high-dimensional coordinates ramp together, and the pair collapses onto a diagonal.

The left panel starts on dimensions 37 and 38 of a 39-dimensional Halton sequence with no randomization, which is exactly that failure. Pick a randomization and the diagonal dissolves into a filled square — or switch the sequence to Sobol, which is base 2 in every dimension and has no ramp to begin with. Every coordinate below is computed by github.com/cwbudde/qmc compiled to WebAssembly and running in this tab; JavaScript draws the pixels and nothing else.

Loading WebAssembly…
Halton
Pseudo-random
— / —
halton — filled circle pseudo-random — cross selected point grid = tenths of the unit square
base, axis x
base, axis y
points
burn-in
leap
seed
randomization
The choice

Point set
39
600
64

The first Halton point is (1/2, 1/3, 1/5, 1/7, …), near a corner of the box in every large-base coordinate. A burn-in throws it and its neighbours away.

Projection

You are looking at a projection. The other 37 coordinates are not on screen and the sequence still varies in every one of them.

Digit inspector

A radical inverse is a mirror. Write the index in base p, then reflect its digits across the radix point: index …d₂d₁d₀ becomes the coordinate 0.d₀d₁d₂…. That reflection is the whole construction, so the row below is drawn as one — integer digits marching left towards the point, fraction digits marching right away from it. Hover a digit to light its twin. With a digit scrambling selected, each digit is rewritten by that dimension's permutation before the reflection is read off. This panel is Halton's: Sobol is base 2 in every dimension and has no digit alphabet to permute, so it disappears when Sobol is selected.

Point

Click any point in either scatter to bring it here.

Expansion

waiting for the wasm module…

base p
raw index
coordinate
unscrambled

What you are looking at

Two axes out of d. Both panels show a projection. A pair of coordinates can look like a perfect lattice while the sequence is badly clumped somewhere you cannot see, and it can look like a diagonal while every other pair is fine. That is why the Discrepancy Bench shows all pairs at once.

The right-hand panel is not a failure. Independent uniform points are supposed to clump and leave gaps; that clumping is exactly the variance a quasi-Monte Carlo sequence is built to remove. Judge the pair on how evenly each fills the grid, not on which looks tidier.

A randomized run is seed-dependent by design. Every randomization on offer makes this randomized quasi-Monte Carlo: change the seed and you get a different, equally valid point set. Fix the seed and it is reproducible again.