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.BaseOptimizerWrapper around the
optsam.GFLSalgorithm [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
Trueaoptsam.Loggerwill be run along with the optimization and saved after the minimization. - verbose – If
Trueanoptsam.Reporterwill be run along with the optimisation to print progress in realtime. - other_hooks – Any extra
optsam.Hookinstances which should be included. - **gfls_algo_kwargs –
Keyword arguments for the optsam GFLS class. If
None, the default arguments are used:Setting Default tr_max0.5xtol1e-3ftol1e-7constraints()tr_minNonetr_scale0.9noise_scale0.1pop_sizeNonediis_mode"qrsvd"seedNone
Notes
GFLSOptimizerrequires 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,GFLSOptimizerwill automatically usedetailed_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.
- _opt_id _signal_pipe _results_queue _pause_flag workers backend is_log_detailed (Inherited,) – See