Parameter Estimators

class ionworkspipeline.ParameterEstimator(solver_args)

Base class for all parameter estimators.

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.

property array_output

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

property cost

Default cost function to use if none is provided

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.

property gradient

Return the objective function parameter gradient.

property objective_and_gradient

Return the objective function and its parameter gradient.

property probabilistic

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

run(x0)

Run the estimator. Must be implemented by the subclass.

Parameters

x0array_like

Initial guess for the independent variables.

Returns

resionworkspipeline.OptimizerResult or ionworkspipeline.SamplerResult

The result of the optimization.

property scalar_output

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

set_bounds(bounds)

Set the bounds using the correct format for the optimizer.

Parameters

boundstuple of arrays

The bounds for the parameters being fit.

set_eq_constraints(eq_constraints)

Set the equality constraint function: the output of this function should evaluate to zero.

Parameters

eq_constraintsdict or tuple or list

The equality constraints to be satisfied.

set_gradient(gradient)

Set the objective function parameter gradient.

Parameters

gradientcallable

The objective function parameter gradient.

set_ineq_constraints(ineq_constraints)

Set the inequality constraint function(s): the output of these functions should evaluate to greater than zero.

Parameters

ineq_constraintslist of callable

The inequality constraint functions.

set_objective(objective)

Set the objective function.

Parameters

objectivecallable

The objective function to be minimized.

set_objective_and_gradient(objective_and_gradient)

Set the objective function and its parameter gradient.

class ionworkspipeline.parameter_estimators.Chain(*estimators)

Chain of estimators to be run in sequence, where the output of one estimator is the initial guess for the next estimator.

Parameters

*estimatorslist of estimator objects

The estimators to be run in sequence.

Extends: builtins.list

property cost

If all estimators have the same default cost function, return it. Otherwise, raise an error.

run(x0)

Optimize the objective function by running each estimator in sequence.

Parameters

x0array_like

Initial guess for the independent variables.

Returns

resionworkspipeline.estimatorResult

The result of the optimization.