Hessian Update Strategies¶
This module provides various generic Hessian approximation strategies that can be employed when the calculating the exact Hessian or an approximation is computationally too demanding.
Classes Summary
|
Broyden-Fletcher-Goldfarb-Shanno update strategy. |
|
Davidon-Fletcher-Powell update strategy. |
|
Abstract class from which Hessian update strategies should subclass |
|
|
|
Symmetric Rank 1 update strategy. |
Classes
- class fides.hessian_approximation.BFGS(hess_init=None)[source]¶
Broyden-Fletcher-Goldfarb-Shanno update strategy. This is a rank 2 update strategy that always yields positive-semidefinite hessian approximations.
- class fides.hessian_approximation.DFP(hess_init=None)[source]¶
Davidon-Fletcher-Powell update strategy. This is a rank 2 update strategy that always yields positive-semidefinite hessian approximations. It usually does not perform as well as the BFGS strategy, but included for the sake of completeness.
- class fides.hessian_approximation.HessianApproximation(hess_init=None)[source]¶
Abstract class from which Hessian update strategies should subclass
- __init__(hess_init=None)[source]¶
Create a Hessian update strategy instance
- Parameters
hess_init (
typing.Optional
[numpy.ndarray
]) – Initial guess for the Hessian, if empty Identity matrix will be used
- get_mat()[source]¶
Getter for the Hessian approximation :rtype:
numpy.ndarray
:return:
- init_mat(dim)[source]¶
Initializes this approximation instance and checks the dimensionality
- Parameters
dim (
int
) – dimension of optimization variables
- set_init(hess_init)[source]¶
Create a Hessian update strategy instance
- Parameters
hess_init (
numpy.ndarray
) – Initial guess for the Hessian, if empty Identity matrix will be used
- class fides.hessian_approximation.HybridUpdate(happ=None, hess_init=None, init_with_hess=False, switch_iteration=20)[source]¶
- __init__(happ=None, hess_init=None, init_with_hess=False, switch_iteration=20)[source]¶
Create a Hybrid Hessian update strategy which is generated from the start but only applied after a certain iteration, while Hessian computed by the objective function is used until then.
- Parameters
happ (
typing.Optional
[fides.hessian_approximation.HessianApproximation
]) – Hessian Update Strategy (default: BFGS)switch_iteration (
typing.Optional
[int
]) – Iteration after which this approximation is used (default: 2*dim)(default (init_with_hess) – False) Whether the hybrid update strategy should be initialized according to the user-provided objective function
hess_init (
typing.Optional
[numpy.ndarray
]) – Initial guess for the Hessian. (default: eye)
- get_mat()[source]¶
Getter for the Hessian approximation :rtype:
numpy.ndarray
:return:
- init_mat(dim)[source]¶
Initializes this approximation instance and checks the dimensionality
- Parameters
dim (
int
) – dimension of optimization variables
- set_init(hess_init)[source]¶
Create a Hessian update strategy instance
- Parameters
hess_init (
numpy.ndarray
) – Initial guess for the Hessian, if empty Identity matrix will be used