autofit.InitializerBall#

class autofit.InitializerBall(lower_limit: float, upper_limit: float)[source]#

Bases: Initializer

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.

Although most non-linear searches have in-built functionality to do this, some do not cope well with parameter resamples that are raised as FitException’s. Thus, PyAutoFit uses its own initializer to bypass these problems.

The InitializerBall class generates the samples in a small compact volume or ‘ball’ in parameter space, which is the recommended initialization strategy for the MCMC NonLinearSearch Emcee.

Parameters:
  • lower_limit – The lower limit of the uniform distribution unit values are drawn from when initializing walkers in a small compact ball.

  • upper_limit – The upper limit of the uniform distribution unit values are drawn from when initializing walkers in a small compact ball.

Methods

figure_of_metric

from_config

Load the Initializer from a non_linear config file.

samples_from_model

Generate the initial points of the non-linear search, by randomly drawing unit values from a uniform distribution between the ball_lower_limit and ball_upper_limit values.

samples_in_test_mode

Generate the initial points of the non-linear search in test mode.