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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for optns-1.4.0.tar.gz
Algorithm Hash digest
SHA256 9e5f8ca49abfb4bdfdec2f0db39d46a25f95e5e2601709dafaf2148a2d24bfe2
MD5 eb78278b81657660612c0e23fac3c1a6
BLAKE2b-256 35fd6e61db03db7d221ddfdb3d70d0e56b79bab553fa85e3aa98caab44585253

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