optiml.opti package
Subpackages
- optiml.opti.constrained package
- Submodules
- Module contents
BoxConstrainedQuadraticOptimizerBoxConstrainedQuadraticOptimizer.f_star()BoxConstrainedQuadraticOptimizer.x_star()BoxConstrainedQuadraticOptimizer.callback()BoxConstrainedQuadraticOptimizer.check_lagrangian_dual_conditions()BoxConstrainedQuadraticOptimizer.check_lagrangian_dual_optimality()BoxConstrainedQuadraticOptimizer.is_augmented_lagrangian_dual()BoxConstrainedQuadraticOptimizer.is_lagrangian_dual()BoxConstrainedQuadraticOptimizer.is_verbose()BoxConstrainedQuadraticOptimizer.minimize()
LagrangianQuadraticAugmentedLagrangianQuadraticAugmentedLagrangianQuadratic.args()AugmentedLagrangianQuadratic.f_star()AugmentedLagrangianQuadratic.x_star()AugmentedLagrangianQuadratic.constraints()AugmentedLagrangianQuadratic.function()AugmentedLagrangianQuadratic.jacobian()AugmentedLagrangianQuadratic.function_jacobian()AugmentedLagrangianQuadratic.hessian()
ProjectedGradientProjectedGradient.minimize()ProjectedGradient.callback()ProjectedGradient.check_lagrangian_dual_conditions()ProjectedGradient.check_lagrangian_dual_optimality()ProjectedGradient.f_star()ProjectedGradient.is_augmented_lagrangian_dual()ProjectedGradient.is_lagrangian_dual()ProjectedGradient.is_verbose()ProjectedGradient.x_star()
ActiveSetFrankWolfeInteriorPointInteriorPoint.minimize()InteriorPoint.callback()InteriorPoint.check_lagrangian_dual_conditions()InteriorPoint.check_lagrangian_dual_optimality()InteriorPoint.f_star()InteriorPoint.is_augmented_lagrangian_dual()InteriorPoint.is_lagrangian_dual()InteriorPoint.is_verbose()InteriorPoint.x_star()
- optiml.opti.unconstrained package
Submodules
Module contents
- class optiml.opti.Optimizer(f, x=None, eps=1e-06, tol=1e-08, max_iter=1000, callback=None, callback_args=(), random_state=None, verbose=False)[source]
Bases:
ABC- Parameters:
f – the objective function.
x – ([n x 1] real column vector): 1D array of points at which the Hessian is to be computed.
eps – (real scalar, optional, default value 1e-6): the accuracy in the stopping criterion: the algorithm is stopped when the norm of the gradient is less than or equal to eps.
max_iter – (integer scalar, optional, default value 1000): the maximum number of iterations.
verbose – (boolean, optional, default value False): print details about each iteration if True, nothing otherwise.
- class optiml.opti.OptimizationFunction(ndim=2)[source]
Bases:
ABC
- class optiml.opti.Quadratic(Q, q)[source]
Bases:
OptimizationFunctionConstruct a quadratic function from its linear and quadratic part defined as
\[\tfrac{1}{2} x^\top Q x + q^\top x\]- Parameters:
Q – ([n x n] real symmetric matrix, not necessarily positive semidefinite): the Hessian (i.e., the quadratic part) of f. If it is not positive semidefinite, f(x) will be unbounded below.
q – ([n x 1] real column vector): the linear part of f.
- function(x)[source]
A general quadratic function \(f(x) = \tfrac{1}{2} x^\top Q x + q^\top x\).
- Parameters:
x – ([n x 1] real column vector): 1D array of points at which the Hessian is to be computed.
- Returns:
the value \(\tfrac{1}{2} x^\top Q x + q^\top x\) of the general quadratic function at x.
- jacobian(x)[source]
The Jacobian (i.e., the gradient) of a general quadratic function \(J f(x) = Q x + q\).
- Parameters:
x – ([n x 1] real column vector): 1D array of points at which the Jacobian is to be computed.
- Returns:
the Jacobian of a general quadratic function.
- hessian(x)[source]
The Hessian matrix of a general quadratic function \(H f(x) = Q\).
- Parameters:
x – 1D array of points at which the Hessian is to be computed.
- Returns:
the Hessian matrix (i.e., the quadratic part) of a general quadratic function at x.
- args()
- function_jacobian(*args, **kwargs)