bsmart.scans.DEAP

Optimisation using genetic algorithm DEAP

BSMArt scan written by M. Goodsell

Requires:

pip3 install deap

https://github.com/DEAP/deap

Information

BSMArt Name: DEAP

Requires:
  • deap

  • numpy

Settings:

  • Points: Int

DEAP
  • Population Size: Int

  • Generations: Int

  • Global Only: Bool

  • n_cores: Int

class bsmart.scans.DEAP.NewScan(inputs, log)[source]

Bases: Scan

Scanner class for NF Scans

get_losses(observables)[source]

Returns a list of losses.

The C-function loss should be zero if the observable is within allowed bounds, and greater than zero outside it.
If we include a validity condition, then other observables, evaluated afterwards, will be returned as NaN.

-> We should assign these the maximum loss ~ 710.

This is then compatible with the explicit use of ‘hierarchical observables’, where all other observables are set to the maximum.

initialise()[source]

method to allow the user scan to overload run settings etc during the initialisation process

postprocess(Point, observables, data_point, temp_dir, log, lock=None)[source]

return the likelihood; we won’t get this far if the point failed to be generated

run()[source]

DEAP scan

Version 1: just use it as an optimisation over a single global likelihood @todo: allow multiple likelihoods for different observables, with hierarchical evaluation