René's URL Explorer Experiment


Title: Save a regression, reload it, and fit MAP - FlatPPL for Python

direct link

Domain: flatppl.org

IPv4 address: 185.199.108.153

color-schemelight dark

Links:

Skip to contenthttps://flatppl.org/flatppl-python/examples/zip_map.html#furo-main-content
FlatPPL for Pythonhttps://flatppl.org/flatppl-python/index.html
FlatPPL for Python https://flatppl.org/flatppl-python/index.html
Installationhttps://flatppl.org/flatppl-python/installation.html
Compile your first functionhttps://flatppl.org/flatppl-python/quickstart.html
Worked tutorialshttps://flatppl.org/flatppl-python/examples/index.html
Sample a posterior with BlackJAX NUTShttps://flatppl.org/flatppl-python/examples/nuts.html
Sample and approximate a posterior with BlackJAXhttps://flatppl.org/flatppl-python/examples/blackjax_nuts_vi.html
Sample a posterior with NumPyro’s NUTShttps://flatppl.org/flatppl-python/examples/numpyro_nuts.html
Fit maximum a posteriori and maximum likelihood points with Optaxhttps://flatppl.org/flatppl-python/examples/optax_fit.html
Diagnose draws with ArviZhttps://flatppl.org/flatppl-python/examples/arviz_diagnostics.html
Sample a posterior with nutpiehttps://flatppl.org/flatppl-python/examples/nutpie_nuts.html
Fit with optimistix BFGS and Levenberg-Marquardthttps://flatppl.org/flatppl-python/examples/optimistix_fit.html
Fit with iminuit and read Hesse and Minos errorshttps://flatppl.org/flatppl-python/examples/iminuit_errors.html
Fit a mixed model with automatic coordinate transformshttps://flatppl.org/flatppl-python/examples/formula.html
From a model file and a dataframe to checked posterior drawshttps://flatppl.org/flatppl-python/examples/regression_workflow.html
A published Belle II likelihood: pyhf to FlatPPL to JAXhttps://flatppl.org/flatppl-python/examples/belle2.html
Fit a three-pion decay with Monte Carlo normalizationhttps://flatppl.org/flatppl-python/examples/amplitude_fit.html
Fit a Gaussian regression with runtime datahttps://flatppl.org/flatppl-python/examples/regression.html
Save a regression, reload it, and fit MAPhttps://flatppl.org/flatppl-python/examples/zip_map.html
Read histograms from ROOT files with uproot and histhttps://flatppl.org/flatppl-python/examples/uproot_hist.html
A discovery fit from ROOT histograms with cabinetryhttps://flatppl.org/flatppl-python/examples/cabinetry_discovery.html
Export a compiled density with jax.exporthttps://flatppl.org/flatppl-python/examples/jax_export.html
Evaluate batched toys on CPU and GPUhttps://flatppl.org/flatppl-python/examples/gpu_toys.html
Query any binding of a modelhttps://flatppl.org/flatppl-python/examples/query.html
Inspect a model’s graphhttps://flatppl.org/flatppl-python/examples/inspection.html
Check a model from the example corpushttps://flatppl.org/flatppl-python/examples/corpus.html
Import a pyhf modelhttps://flatppl.org/flatppl-python/pyhf.html
Coordinate transforms for inferencehttps://flatppl.org/flatppl-python/transforms.html
Incremental query executionhttps://flatppl.org/flatppl-python/incremental.html
Log densities for inference packageshttps://flatppl.org/flatppl-python/inference.html
Modules and contextshttps://flatppl.org/flatppl-python/modules.html
Python values and signatureshttps://flatppl.org/flatppl-python/values.html
Regression formulashttps://flatppl.org/flatppl-python/formula.html
JAX and differentiationhttps://flatppl.org/flatppl-python/jax.html
Numerical integrationhttps://flatppl.org/flatppl-python/integration.html
API referencehttps://flatppl.org/flatppl-python/api.html
Example corpus qualificationhttps://flatppl.org/flatppl-python/corpus.html
Development and documentationhttps://flatppl.org/flatppl-python/development.html
Changeloghttps://flatppl.org/flatppl-python/changelog.html
Back to top https://flatppl.org/flatppl-python/examples/zip_map.html
Go to the endhttps://flatppl.org/flatppl-python/examples/zip_map.html#sphx-glr-download-examples-zip-map-py
https://flatppl.org/flatppl-python/examples/zip_map.html#save-a-regression-reload-it-and-fit-map
Installationhttps://flatppl.org/flatppl-python/installation.html
Pathhttps://docs.python.org/3/library/pathlib.html#pathlib.Path
minimizehttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.minimize.html#jax.scipy.optimize.minimize
https://flatppl.org/flatppl-python/examples/zip_map.html#write-the-data-and-model
directoryhttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
Pathhttps://docs.python.org/3/library/pathlib.html#pathlib.Path
directory.mkdirhttps://docs.python.org/3/library/pathlib.html#pathlib.Path.mkdir
datahttps://docs.python.org/3/builtins/stdtypes.html#dict
directoryhttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
json.dumpshttps://docs.python.org/3/library/json.html#json.dumps
datahttps://docs.python.org/3/builtins/stdtypes.html#dict
directoryhttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
modelhttps://flatppl.org/flatppl-python/api.html#flatppl.Module
fp.loadhttps://flatppl.org/flatppl-python/api.html#flatppl.load
directoryhttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
datahttps://docs.python.org/3/builtins/stdtypes.html#dict
model.context.registerhttps://flatppl.org/flatppl-python/api.html#flatppl.Module.context
modelhttps://flatppl.org/flatppl-python/api.html#flatppl.Module
https://flatppl.org/flatppl-python/examples/zip_map.html#define-the-query-signature-and-save-the-analysis
queryhttps://flatppl.org/flatppl-python/api.html#flatppl.Module
fp.flatpplhttps://flatppl.org/flatppl-python/api.html#flatppl.flatppl
model.contexthttps://flatppl.org/flatppl-python/api.html#flatppl.Module.context
archivehttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
directoryhttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
query.savehttps://flatppl.org/flatppl-python/api.html#flatppl.Module.save
archivehttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
https://flatppl.org/flatppl-python/examples/zip_map.html#load-the-archive-and-compile-its-query
restoredhttps://flatppl.org/flatppl-python/api.html#flatppl.Module
fp.loadhttps://flatppl.org/flatppl-python/api.html#flatppl.load
archivehttps://docs.python.org/3/library/pathlib.html#pathlib.PosixPath
restoredhttps://flatppl.org/flatppl-python/api.html#flatppl.Module
queryhttps://flatppl.org/flatppl-python/api.html#flatppl.Module
restored.contexthttps://flatppl.org/flatppl-python/api.html#flatppl.Module.context
model.contexthttps://flatppl.org/flatppl-python/api.html#flatppl.Module.context
logdensityhttps://flatppl.org/flatppl-python/api.html#flatppl.CompiledFunction
restored.compilehttps://flatppl.org/flatppl-python/api.html#flatppl.Module.compile
https://flatppl.org/flatppl-python/examples/zip_map.html#fit-the-map-coefficients
JAX’s BFGS optimizerhttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.minimize.html
jax.Arrayhttps://docs.jax.dev/en/latest/_autosummary/jax.Array.html#jax.Array
jax.Arrayhttps://docs.jax.dev/en/latest/_autosummary/jax.Array.html#jax.Array
logdensityhttps://flatppl.org/flatppl-python/api.html#flatppl.CompiledFunction
fithttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.OptimizeResults.html#jax.scipy.optimize.OptimizeResults
minimizehttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.minimize.html#jax.scipy.optimize.minimize
jnp.zeroshttps://docs.jax.dev/en/latest/_autosummary/jax.numpy.zeros.html#jax.numpy.zeros
jnp.float32https://docs.jax.dev/en/latest/_autosummary/jax.numpy.float32.html#jax.numpy.float32
fithttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.OptimizeResults.html#jax.scipy.optimize.OptimizeResults
fithttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.OptimizeResults.html#jax.scipy.optimize.OptimizeResults
intercepthttps://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.float32
slopehttps://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.float32
np.asarrayhttps://numpy.org/doc/stable/reference/generated/numpy.asarray.html#numpy.asarray
fithttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.OptimizeResults.html#jax.scipy.optimize.OptimizeResults
intercepthttps://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.float32
slopehttps://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.float32
https://flatppl.org/flatppl-python/examples/zip_map.html#check-against-the-exact-gaussian-solution
Xhttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
np.column_stackhttps://numpy.org/doc/stable/reference/generated/numpy.column_stack.html#numpy.column_stack
np.oneshttps://numpy.org/doc/stable/reference/generated/numpy.ones.html#numpy.ones
datahttps://docs.python.org/3/builtins/stdtypes.html#dict
datahttps://docs.python.org/3/builtins/stdtypes.html#dict
precisionhttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
X.Thttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
Xhttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
np.eyehttps://numpy.org/doc/stable/reference/generated/numpy.eye.html#numpy.eye
exacthttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
np.linalg.solvehttps://numpy.org/doc/stable/reference/generated/numpy.linalg.solve.html#numpy.linalg.solve
precisionhttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
X.Thttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
np.asarrayhttps://numpy.org/doc/stable/reference/generated/numpy.asarray.html#numpy.asarray
datahttps://docs.python.org/3/builtins/stdtypes.html#dict
np.testing.assert_allclosehttps://numpy.org/doc/stable/reference/generated/numpy.testing.assert_allclose.html#numpy.testing.assert_allclose
fithttps://docs.jax.dev/en/latest/_autosummary/jax.scipy.optimize.OptimizeResults.html#jax.scipy.optimize.OptimizeResults
exacthttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
exacthttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
exacthttps://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray
Download Jupyter notebook: zip_map.ipynbhttps://flatppl.org/flatppl-python/_downloads/e79cb4fa43c125b1b8d3db1d44d532ca/zip_map.ipynb
Download Python source code: zip_map.pyhttps://flatppl.org/flatppl-python/_downloads/9f54c127d2bc01181a59bc70da1f97ea/zip_map.py
Download zipped: zip_map.ziphttps://flatppl.org/flatppl-python/_downloads/921ea9fa6965774e7df4878bc2332df1/zip_map.zip
Gallery generated by Sphinx-Galleryhttps://sphinx-gallery.github.io
Next Read histograms from ROOT files with uproot and hist https://flatppl.org/flatppl-python/examples/uproot_hist.html
Previous Fit a Gaussian regression with runtime data https://flatppl.org/flatppl-python/examples/regression.html
Sphinxhttps://www.sphinx-doc.org/
@pradyunsghttps://pradyunsg.me
Furohttps://github.com/pradyunsg/furo
Save a regression, reload it, and fit MAPhttps://flatppl.org/flatppl-python/examples/zip_map.html
Write the data and modelhttps://flatppl.org/flatppl-python/examples/zip_map.html#write-the-data-and-model
Define the query signature and save the analysishttps://flatppl.org/flatppl-python/examples/zip_map.html#define-the-query-signature-and-save-the-analysis
Load the archive and compile its queryhttps://flatppl.org/flatppl-python/examples/zip_map.html#load-the-archive-and-compile-its-query
Fit the MAP coefficientshttps://flatppl.org/flatppl-python/examples/zip_map.html#fit-the-map-coefficients
Check against the exact Gaussian solutionhttps://flatppl.org/flatppl-python/examples/zip_map.html#check-against-the-exact-gaussian-solution

Response headers:
ServerGitHub.com
Content-Typetext/html; charset=utf-8
Via1.1 varnish
Cache-Controlmax-age=600
Last-ModifiedFri, 20 Nov 2026 16:47:24 GMT

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.