Non-Linear Searches#

A non-linear search is an algorithm which fits a model to data.

PyAutoFit supports 15 non-linear searches in three families: nested samplers (nest), Markov chain Monte Carlo (MCMC) and maximum likelihood / maximum a posteriori estimators (MLE). The capability matrix compares them (JAX use, gradients, evidence, posterior kind, install) and the search citations page lists what to cite for each.

Examples / Tutorials:

Markov chain Monte Carlo#

Emcee

An Emcee non-linear search.

Zeus

A Zeus non-linear search.

BlackJAXNUTS

A BlackJAX No-U-Turn Sampler (NUTS) non-linear search.

SMC

A BlackJAX adaptive tempered Sequential Monte Carlo (SMC) non-linear search with a gradient inner kernel.

Nested sampling#

DynestyStatic

A Dynesty NonLinearSearch using a static number of live points.

DynestyDynamic

A Dynesty non-linear search, using a dynamically changing number of live points.

Nautilus

A Nautilus non-linear search.

NSS

A Nested Slice Sampling non-linear search (JAX-native, blackjax.nss).

Maximum likelihood / maximum a posteriori#

Drawer

A Drawer non-linear search, which simply draws a fixed number of samples from the model uniformly from the priors.

BFGS

Abstract wrapper for the BFGS and L-BFGS scipy non-linear searches.

LBFGS

Abstract wrapper for the BFGS and L-BFGS scipy non-linear searches.

MultiStartAdam

A multi-start first-order gradient MAP optimizer (the "GIGA-Lens" recipe).

MultiStartADABelief

A multi-start first-order gradient MAP optimizer (the "GIGA-Lens" recipe).

MultiStartLion

A multi-start first-order gradient MAP optimizer (the "GIGA-Lens" recipe).

MultiStartProdigy

A multi-start first-order gradient MAP optimizer (the "GIGA-Lens" recipe).

There are also a number of tools which are used to customize the behaviour of non-linear searches in PyAutoFit, including directory output structure, parameter sample initialization and MCMC auto correlation analysis.

Tools#

DirectoryPaths

Manages the path structure for NonLinearSearch output, for analyses both not using and using the search API.

DatabasePaths

Manages the path structure for NonLinearSearch output, for analyses both not using and using the search API.

Result

The result of a non-linear search.

InitializerBall

The Initializer creates the initial set of samples in non-linear parameter space that can be passed into a NonLinearSearch to define where to begin sampling.

InitializerPrior

The Initializer creates the initial set of samples in non-linear parameter space that can be passed into a NonLinearSearch to define where to begin sampling.

ClipperNone

The no-op clipper, and the default.

ClipperPriorBox

Hard projection onto the prior support, inset to stay strictly inside it.

AutoCorrelationsSettings

Class for performing and customizing AutoCorrelation calculations, which are used:

PyAutoFit can perform a parallelized grid-search of non-linear searches, where a subset of parameters in the model are fitted in over a discrete grid.

Examples / Tutorials:

GridSearch#

SearchGridSearch

GridSearchResult

The sample of a grid search.