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)arrayorsparsearray Jacobian matrix used to compute sensitivity weights. It must be a dense or sparse array.
- data_weights(n_data,)
arrayorNone, optional Array with data weights used to compute the sensitivty weights. Can use the
inversion_ideas.DataMisfit.weightsproperty.- volumes(
n_params)arrayorNone, 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.
- vmin
floatorNone, optional Minimum value used for clipping.
- jacobian(
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_weightsisNone, each one of the \(w_i\) elements will be equal to one.Important
If
volumesisNone, 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
vminis passed, then all sensitivity weights below or equal to that value will be assigned the samevminvalue.