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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for optns-2.1.0.tar.gz
Algorithm Hash digest
SHA256 b352f1db77cd848b5b1c2268da0cdf4757306b051e4c888aefd93ae43c2cf38a
MD5 a5e62b9039ac82e9b3119471e0d58f1a
BLAKE2b-256 0b545a3b5fb8cc53d31cd4171f87cf7d52a8b14dcc62b9b41bff31ea818d048e

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