piglot.optimisers.spsa_adam.SPSA_Adam

class SPSA_Adam(objective: Objective, alpha=0.01, beta1=0.9, beta2=0.999, epsilon=1e-08, gamma=0.101, prob=0.5, c=None, seed=1)[source]

Bases: ScalarOptimiser

Hybrid Simultaneous Perturbation Stochastic Approximation-Adam method for optimisation.

References: https://ieeexplore.ieee.org/document/705889 https://arxiv.org/abs/1412.6980

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.