inversion_ideas.utils.get_sensitivity_weights#

inversion_ideas.utils.get_sensitivity_weights(jacobian, *, data_weights=None, volumes=None, vmin=1e-12)#

Compute sensitivity weights.

Parameters:
jacobian(n_data, n_params) array or sparse array

Jacobian matrix used to compute sensitivity weights. It must be a dense or sparse array.

data_weights(n_data,) array or None, optional

Array with data weights used to compute the sensitivty weights. Can use the inversion_ideas.DataMisfit.weights property.

volumes(n_params) array or None, optional

Array with the volumes of the active cells. Sensitivity weights are divided by the volumes to account for sensitivity changes due to cell sizes.

vminfloat or None, optional

Minimum value used for clipping.

Notes

Given a Jacobian matrix \(\mathbf{J}\):

\[\begin{split}\mathbf{J} = \begin{bmatrix} J_{11} & \cdots & J_{1M} \\ \vdots & \ddots & \vdots \\ J_{N1} & \cdots & J_{NM} \end{bmatrix}\end{split}\]

a data weights vector \(\mathbf{w}\):

\[\mathbf{w} = \left[ w_1, \dots, w_N \right],\]

and a cell volumes vector \(\mathbf{V}\):

\[\mathbf{V} = \left[ V_1, \dots, V_M \right],\]

the \(j\) -th component of the initial sensitivity weights vector \(\hat{\mathbf{s}}\) is defined as:

\[\hat{s}_j = \frac{1}{V_j} \sqrt{ \sum\limits_{i=0}^N w_i J_{ij}^2 }.\]

Note

If data_weights is None, each one of the \(w_i\) elements will be equal to one.

Important

If volumes is None, then each one of the \(V_j\) elements will be equal to one.

Each one of the components of the sensitivity weights vector \(\mathbf{s}\) is obtained by normalizing the components of \(\hat{\mathbf{s}}\) by its maximum value:

\[s_j = \frac{\hat{s}_j}{\max({\hat{\mathbf{s}}})}\]

Important

If vmin is passed, then all sensitivity weights below or equal to that value will be assigned the same vmin value.