Skip to main content

Optimized Nested Sampling: fast inference for non-linear additive models

Project description

Faster inference by parameter space reduction of linear parameters.

https://img.shields.io/pypi/v/optns.svg https://github.com/JohannesBuchner/OptNS/actions/workflows/tests.yml/badge.svg https://coveralls.io/repos/github/JohannesBuchner/OptNS/badge.svg?branch=main Github repository

Context

For models that are composed of additive components:

y = A_1 * y_1(x|theta) + A_2 * y_2(x|theta) + ...

And data that are one of:

y_obs ~ Normal(y, sigma)
y_obs ~ Poisson(y)

y may be one or multi-dimensional. sigma may be different for each y (heteroscadastic).

Here we see that each component y_i changes y linearly with its normalisation parameter A_i.

We therefore have two groups of parameters:

  • linear parameters: A_i

  • non-linear parameters: theta

We can define the predictive part of our model as:

y_1, y_2, ... = compute_components(x, theta)

What optns does

  1. Profile likelihood inference with nested sampling. That means the normalisations are optimized away.

  2. Post-processing: The full posterior (A_i and theta) is sampled by conditionally sampling A_i given theta.

Usage

See the demo scripts in the examples folder!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optns-1.3.0.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file optns-1.3.0.tar.gz.

File metadata

  • Download URL: optns-1.3.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for optns-1.3.0.tar.gz
Algorithm Hash digest
SHA256 d8658b83e561e6c7b2fe4a862e8840ca4b6f46528ad2eea05a871d5bd699eebe
MD5 baddc3a2bb54e9ae1f6dd7dfe7ea6af5
BLAKE2b-256 854b8345c56cdc3e3278d503a951320e6b54afab33b4a7897966e3ff956d1f2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page