inversion_ideas.TikhonovZero#
- class inversion_ideas.TikhonovZero(n_params, weights=None, reference_model=None)#
Tikhonov zero-th order regularization.
- Parameters:
- n_paramsint
Number of elements in the
modelarray.- weights(n_params) array or dict of (n_params) arrays or None, optional
Array with regularization weights. For multiple weights, pass a dictionary where keys are strings and values are the different weights arrays. If None, no weights are going to be used.
- reference_model(n_params) array or None, optional
Array with values for the reference model.
Attributes
Number of model parameters.
Name of the objective function.
Regularization weights.
Diagonal matrix with the square root of the regularization weights.
Methods
__call__(model)Evaluate the regularization on a given model.
gradient(model)Gradient vector.
hessian(model)Hessian matrix.
hessian_diagonal(model)Get the main diagonal of the Hessian.
info()Get information about the objective function.
set_name(value)Set name for the objective function.
Notes
Implement a Tikhonov zero-th order regularization as follows:
\[\phi(\mathbf{m}) = \sum\limits_{i=1}^M w_i |m_i - m_i^\text{ref}|^2 = \lVert \mathbf{W} (\mathbf{m} - \mathbf{m}^\text{ref}) \rVert^2\]where \(\mathbf{W} = [\sqrt{w_1}, \dots, \sqrt{w_M}]\) are the square roots of the regularization weights, \(\mathbf{m} = [m_1, \dots, m_M]\) and \(\mathbf{m}^\text{ref} = [m_1^\text{ref}, \dots, m_M^\text{ref}]\) are the model and reference model vectors, respectively.
Attributes#
- TikhonovZero.n_params#
Number of model parameters.
- TikhonovZero.name#
Name of the objective function.
- TikhonovZero.weights#
Regularization weights.
- TikhonovZero.weights_matrix#
Diagonal matrix with the square root of the regularization weights.
Methods#
Methods documentation
- TikhonovZero.__call__(model)#
Evaluate the regularization on a given model.
- Parameters:
- model(n_params) array
Array with model values.
- TikhonovZero.gradient(model)#
Gradient vector.
- Parameters:
- model(n_params) array
Array with model values.
- TikhonovZero.hessian(model)#
Hessian matrix.
- Parameters:
- model(n_params) array
Array with model values.
- TikhonovZero.hessian_diagonal(model)#
Get the main diagonal of the Hessian.
- Parameters:
- model(n_params) array
Array with model values.
- Returns:
- (n_params,) array
Array containing the diagonal of the Hessian.
- TikhonovZero.info()#
Get information about the objective function.
- TikhonovZero.set_name(value)#
Set name for the objective function.