bluepyemodel.optimisation.optimisation

Optimisation function

Functions

run_optimisation(optimiser, checkpoint_path, ...)

Run the optimisation.

setup_and_run_optimisation(access_point, seed)

setup_optimiser(evaluator, map_function, params)

Setup the bluepyopt optimiser.

store_best_model(access_point[, seed, ...])

Store the best model from an optimisation. Reads a checkpoint file generated

run_optimisation(optimiser, checkpoint_path, max_ngen, terminator=None, optimisation_checkpoint_period=None)

Run the optimisation.

Parameters:
  • optimiser (DEAPOptimisation) – optimiser used for the run.

  • checkpoint_path (str) – path to which the checkpoint will be saved.

  • max_ngen (int) – maximum number of generation for which the evolutionary strategy will run.

  • terminator (multiprocessing.Event) – end optimisation when is set. Not taken into account if None.

Returns:

None

setup_optimiser(evaluator, map_function, params, optimiser='IBEA', use_stagnation_criterion=True)

Setup the bluepyopt optimiser.

Parameters:
  • evaluator (CellEvaluator) – evaluator used to compute the scores.

  • map_function (map) – used to parallelize the evaluation of the individual in the population.

  • params (dict) – optimisation meta-parameters.

  • optimiser (str) – name of the optimiser, has to be “IBEA”, “SO-CMA” or “MO-CMA”.

  • use_stagnation_criterion (bool) – whether to use the stagnation stopping criterion on top of the maximum generation criterion for CMA

Returns:

DEAPOptimisation

store_best_model(access_point, seed=None, checkpoint_path=None)
Store the best model from an optimisation. Reads a checkpoint file generated

by BluePyOpt and store the best individual of the hall of fame.

Parameters:
  • access_point (DataAccessPoint) – data access point.

  • checkpoint_path (str) – path to the checkpoint file. If None, checkpoint_dir will be used.