Optimizers

class ionworkspipeline.optimizers.Optimizer(solver_args)

Base class for all optimizers.

Parameters

ftolfloat, optional

The tolerance for the change in the value of the objective function.

xtolfloat, optional

The tolerance for the change in the value of the independent variables.

method :

The method to use for the optimization.

verbosebool, optional

Whether to print information at runtime. Default is False.

Extends: ionworkspipeline.data_fits.parameter_estimators.parameter_estimator.ParameterEstimator

property probabilistic

Whether the estimator is probabilistic. Must be implemented by the subclass.

run(x0)

Optimize the objective function.

Parameters

x0array_like

Initial guess for the independent variables.

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

class ionworkspipeline.optimizers.ScipyDifferentialEvolution(**solver_args)

Optimizer using the scipy differential_evolution function.

Parameters

solver_argsdict, optional

Parameters are passed to the scipy differential_evolution function. See the documentation for scipy.optimize.differential_evolution for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

run(x0)

Optimize the objective function.

Parameters

x0 : array_like

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.ScipyLeastSquares(**solver_args)

Optimizer using the scipy least_squares function.

Parameters

solver_argsdict, optional

Parameters are passed to the scipy least_squares function. See the documentation for scipy.optimize.least_squares for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

run(x0)

Optimize the objective function.

Parameters

x0array_like

Initial guess.

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.ScipyMinimize(**solver_args)

Optimizer using the scipy minimize function.

Parameters

solver_argsdict, optional

Parameters are passed to the scipy minimize function. See the documentation for scipy.optimize.minimize for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

run(x0)

Optimize the objective function.

Parameters

x0 : array_like

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.ScipyShgo(**solver_args)

Optimizer using the scipy SHGO (Simplicial Homology Global Optimization) function.

Parameters

solver_argsdict, optional

Parameters are passed to the scipy shgo function. See the documentation for scipy.optimize.shgo for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

run(x0)

Optimize the objective function.

Parameters

x0array_like

Initial guess. Note that SHGO is a global optimizer and doesn’t strictly require an initial guess, but it can be used to set the dimensionality of the problem.

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.ScipyDualAnnealing(**solver_args)

Optimizer using the scipy Dual Annealing function.

Parameters

solver_argsdict, optional

Parameters are passed to the scipy dual_annealing function. See the documentation for scipy.optimize.dual_annealing for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

run(x0)

Optimize the objective function.

Parameters

x0array_like

Initial guess. Note that Dual Annealing is a global optimizer and doesn’t strictly require an initial guess, but it can be used to set the dimensionality of the problem.

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.PDFO(**solver_args)

Optimizer using the library PDFO: Powell’s Derivative-Free Optimization solvers.

Parameters

solver_argsdict, optional

Parameters are passed to the pdfo function. See the pdfo documentation for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

run(x0)

Optimize the objective function.

Parameters

x0 : array_like

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.Pints(method='CMAES', log_to_screen=False, max_iterations=1000, max_unchanged_iterations=200, max_unchanged_iterations_threshold=1e-11, threshold=None, **solver_args)

Optimizer using the library pints: Probabilistic Inference for Bayesian Models. This is a wrapper around the pints OptimisationController class.

Parameters

methodstr, optional

The method to use for the optimization. Default is “CMAES”. Must be one of: “CMAES”, “Nelder-Mead”, “PSO”, “XNES”, or “SNES”.

log_to_screenbool, optional

Whether to print information at runtime. Default is False.

max_iterationsint, optional

The maximum number of iterations. Default is 1000.

max_unchanged_iterationsint, optional

The maximum number of unchanged iterations. Default is 200.

max_unchanged_iterations_thresholdfloat, optional

The threshold for the maximum number of unchanged iterations. Default is 1e-11.

solver_argsdict, optional

Parameters are passed to the pints function. See the pints documentation for details.

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

property custom_eq_constraints

Whether the equality constraints are handled specially by the estimator.

property custom_ineq_constraints

Whether the inequality constraints are handled specially by the estimator.

methods()

Return the methods supported by the pints optimizer.

run(x0)

Optimize the objective function.

Parameters

x0 : array_like

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.

class ionworkspipeline.optimizers.Dummy

Dummy optimizer, returns the initial guess

Extends: ionworkspipeline.data_fits.parameter_estimators.optimizers.optimizer.Optimizer

property array_output

Whether the objective function supports vector-valued outputs. Must be implemented by the subclass.

run(x0)

Return the initial guess

Parameters

x0array_like

Initial guess for the independent variables.

Returns

resionworkspipeline.OptimizerResult

The result of the optimization.

property scalar_output

Whether the objective function supports scalar-valued outputs. Must be implemented by the subclass.