GFLS

class glompo.optimizers.gfls.GFLSOptimizer(_opt_id: Optional[int] = None, _signal_pipe: Optional[multiprocessing.connection.Connection] = None, _results_queue: Optional[queue.Queue] = None, _pause_flag: Optional[multiprocessing.context.BaseContext.Event] = None, workers: int = 1, backend: str = 'threads', is_log_detailed: bool = False, logger: bool = False, verbose: bool = False, other_hooks: Optional[Sequence[<sphinx.ext.autodoc.importer._MockObject object at 0x7fcec0bb57b8>]] = None, **gfls_algo_kwargs)[source]

Bases: glompo.optimizers.baseoptimizer.BaseOptimizer

Wrapper around the optsam.GFLS algorithm [d]. Note that this class is also stand-alone, this means it can be used independently of the GloMPO framework.

Parameters:
  • _opt_id _signal_pipe _results_queue _pause_flag workers backend is_log_detailed (Inherited,) – See BaseOptimizer.
  • logger – If True a optsam.Logger will be run along with the optimization and saved after the minimization.
  • verbose – If True an optsam.Reporter will be run along with the optimisation to print progress in realtime.
  • other_hooks – Any extra optsam.Hook instances which should be included.
  • **gfls_algo_kwargs

    Keyword arguments for the optsam GFLS class. If None, the default arguments are used:

    Setting Default
    tr_max 0.5
    xtol 1e-3
    ftol 1e-7
    constraints ()
    tr_min None
    tr_scale 0.9
    noise_scale 0.1
    pop_size None
    diis_mode "qrsvd"
    seed None

Notes

GFLSOptimizer requires residuals (differences between a training set and evaluated values) to work. Thus, it cannot be used on all global optimization cases. To ensure compatibility and allow simultaneous use of multiple optimizer types, GFLSOptimizer will automatically use detailed_call() when evaluating the function. It is assumed that the first element of the return is the total error and the second element is the list of residuals. Other returns are ignored.

get_evaluation() → Tuple[Sequence[float], bool, float, Sequence[float]][source]

Returns a parameter vector and its evaluation. Depending on the configuration of the optimizer this can be a simple serial evaluation or retrieving from a list of completed evaluations from a pool of asynchronous parallel evaluations.