nessai.proposal.base#

Base object for all proposal classes.

Classes#

Proposal

Base proposal object

Module Contents#

class nessai.proposal.base.Proposal(model, rng: numpy.random.Generator | None = None)#

Bases: abc.ABC

Base proposal object

Parameters:
model: obj

User-defined model

rng: np.random.Generator, optional

Random number generator. If not provided, a new generator is created.

property initialised#

Boolean that indicates if the proposal is initialised or not.

initialise()#

Initialise the proposal

update_output(output: str) None#

Update the output directory.

Only updates the output if the proposal has an output attribute.

Parameters:
output: str

Path to the output directory

evaluate_likelihoods()#

Evaluate the likelihoods for the pool of live points.

abstract draw(old_param)#

New a new point given the old point

train(x, **kwargs)#

Train the proposal method

Parameters:
x: array_like

Array of live points to use for training

kwargs:

Any of keyword arguments

resume(model)#

Resume the proposal with the model