piglot.optimisers.lipo_opt.LIPO

class LIPO(objective: Objective, log_args='auto', flexible_bounds={}, flexible_bound_threshold=-1.0, epsilon=0.0, seed=None)[source]

Bases: ScalarOptimiser

LIPO optimiser. Documentation: https://github.com/jdb78/lipo http://blog.dlib.net/2017/12/a-global-optimization-algorithm-worth.html

Attributes

log_argslist[str]

list of arguments to treat in log space, if “auto”, then a variable is optimized in log space if (default = ‘auto’): - The lower bound on the variable is > 0 - The ratio of the upper bound to lower bound is > 1000 - The variable is not an integer variable

flexible_boundsdict[str, list[bool]]

dictionary of parameters and list of booleans indicating if parameters are deemed flexible or not. By default all parameters are deemed flexible but only if flexible_bound_threshold > 0 (default = {}).

flexible_bound_thresholdfloat

enlarge bounds if optimum is top or bottom flexible_bound_threshold quantile (default = -1.0)

epsilonfloat

accuracy below which exploration will be priorities vs exploitation (default = 0)

random_stateint

random state

Methods

_optimise(self, func, n_dim, n_iter, bound, init_shot):

Solves the optimization problem

Methods

optimise

Optimiser for the outside world.

optimise(n_iter: int, parameters: ~piglot.parameter.ParameterSet, output_dir: str, stop_criteria: ~piglot.optimiser.StoppingCriteria = <piglot.optimiser.StoppingCriteria object>, verbose: bool = True) Tuple[float, ndarray]

Optimiser for the outside world.

Parameters

objectiveObjective

Objective function to optimise.

n_iterint

Maximum number of iterations.

parametersParameterSet

Set of parameters to optimise.

output_dirstr

Whether to write output to the output directory, by default None.

stop_criteriaStoppingCriteria

List of stopping criteria, by default none attributed.

verbosebool

Whether to output progress status, by default True.

Returns

float

Best observed objective value.

np.ndarray

Observed optimum of the objective.