inversion_ideas.conjugate_gradient#
- inversion_ideas.conjugate_gradient(objective, initial_model, preconditioner=None, **kwargs)#
Minimize objective function with a Conjugate Gradient method.
Important
This minimizer should be used only for linear objective functions.
- Parameters:
- objectiveObjective
Objective function to be minimized.
- initial_model(n_params) array
Initial model used to start the minimization.
- preconditioner(n_params, n_params) array, sparse array or LinearOperator, optional
Matrix used as preconditioner in the conjugate gradient algorithm. If None, no preconditioner will be used. If the preconditioner implements an
initializemethod, the preconditioner will be initialized before being used in the conjugate gradient algorithm.- kwargsdict
Extra arguments that will be passed to the
scipy.sparse.linalg.cg()function.
- Returns:
- inverted_model(n_params) array
Inverted model obtained after minimization.
Notes
Minimize the objective function \(\phi(\mathbf{m})\) by solving the system:
\[\bar{\bar{\nabla}} \phi \mathbf{m}^{*} = - \bar{\nabla} \phi\]through a Conjugate Gradient algorithm, where \(\bar{\bar{\nabla}} \phi\) and \(\bar{\nabla} \phi\) are the the Hessian and the gradient of the objective function, respectively.