coexist.access.AccessSetup#

class coexist.access.AccessSetup(script_path)[source]#

Bases: object

Structure storing constant attributes for an ACCES optimisation run.

Code validation and generation are handled too.

Attributes:
parameterspd.DataFrame

The free parameters extracted from the user script.

parameters_scaledpd.DataFrame

The free parameters scaled to the phenotype space, such that the initial variance (sigma) is unity.

scalingnp.ndarray

A vector of values that the free parameters are scaled by; it is the initial variance (sigma) given by the user.

scriptstr

The modified user script that will be executed.

populationint

The number of simulations to be run in parallel in each epoch.

targetfloat

The target scaled variance - i.e. decrease the uncertainty from the initial 1 down to target.

seed: int

The random seed defining a single ACCES run.

rng: np.random.Generator

The random number generator used, seeded with seed.

__init__(script_path)[source]#

Given a path to a user-defined simulation script, extract the free parameters and generate the ACCES script.

Methods

__init__(script_path)

Given a path to a user-defined simulation script, extract the free parameters and generate the ACCES script.

setup_complete(population, target, seed)

Set up the final attributes before starting the ACCES run - i.e. the ones set in the Access.learn method.

starting_guess()

Return the initial parameter combinations to start CMA-ES with.

validate_parameters(parameters)

Validate the free parameters extracted from a user script (a pandas.DataFrame).

static validate_parameters(parameters)[source]#

Validate the free parameters extracted from a user script (a pandas.DataFrame).

setup_complete(population, target, seed)[source]#

Set up the final attributes before starting the ACCES run - i.e. the ones set in the Access.learn method.

starting_guess()[source]#

Return the initial parameter combinations to start CMA-ES with.