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_obs ~ GP(y)

y may be one or multi-dimensional. sigma may be different for each y (heteroscadastic). GP may be a Gaussian process from celerite or george.

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-2.0.0.tar.gz (22.2 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for optns-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d6d4330d1b3f5d7c9fc45a46bdb3311e3543d5e79aa26b412c34da913193def7
MD5 7e544736c4f4ab15cc14de5f92fba692
BLAKE2b-256 637024c5ce6811e8b505527ba7494abd989b2870de487c334d66ed080f6c8cfb

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