Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

gaussianization tutorial

Part 1 — 1D Marginal Transforms

The atomic operation of Gaussianization: turn one coordinate’s distribution into a standard normal via z=Φ1(F(x))z = \Phi^{-1}(F(x)) for some monotone CDF estimator FF. Every method in the curriculum stacks these 1D maps between rotations, so Part 1 builds them every way that matters — estimating FF, computing the Jacobian the flow needs, inverting it, and training it — grounded in rbig and gauss_flows.

Each notebook keeps the Part 0 pattern: derive the idea, then confirm it against the packages.

Notebooks

#notebookmaster listwhat you take away
00ECDF & histograms1.1–1.3rank→uniform→normal; Glivenko–Cantelli; the ECDF’s degenerate Jacobian
01KDE & Gaussian-mixture CDFs1.4–1.6smooth CDFs; analytic mixture log-det; choosing hh / KK (BIC)
02Monotone-spline CDFs1.7–1.8monotonicity (PCHIP vs overshoot); RQS with exact inverse + analytic log-det
03Learnable mixture-CDF1.9the marginal as a trainable layer; end-to-end MLE
04Inversion strategies1.10–1.12bisection vs Newton; safeguarded hybrid; differentiating the inverse (unroll/one-step/adjoint); batched vmap

Each estimator notebook also carries a Jacobian / log-determinant section (dz/dx=f(x)/φ(z)\mathrm{d}z/\mathrm{d}x = f(x)/\varphi(z), logT=logf(x)logφ(z)\log|T'| = \log f(x) - \log\varphi(z)), since that per-coordinate gradient is the term a flow sums in log_prob.

Threads from Part 0

Running

Same uv environment as Part 0 (rbig + gauss_flows + a Jupyter stack), with interpax added for gauss_flows.HistogramCDF:

cd projects/gaussianization
uv pip install --python .venv-tutorials/bin/python interpax
.venv-tutorials/bin/jupyter nbconvert --to notebook --execute --inplace \
  notebooks/01_marginal_transforms/0*.ipynb --ExecutePreprocessor.timeout=600

Notebooks are paired (jupytext, py:percent) and set jax_enable_x64.