# SimPEG.regularization.Smallness#

class SimPEG.regularization.Smallness(mesh, **kwargs)[source]#

Smallness regularization for least-squares inversion.

Smallness regularization is used to ensure that differences between the model values in the recovered model and the reference model are small; i.e. it preserves structures in the reference model. If a reference model is not supplied, the starting model will be set as the reference model in the corresponding objective function by default. Optionally, custom cell weights can be included to control the degree of smallness being enforced throughout different regions the model.

See the Notes section below for a comprehensive description.

Parameters:
meshregularization.RegularizationMesh

Mesh on which the regularization is discretized. Not the mesh used to define the simulation.

active_cellsNone, (n_cells, ) numpy.ndarray of bool

Boolean array defining the set of RegularizationMesh cells that are active in the inversion. If None, all cells are active.

mappingNone, SimPEG.maps.BaseMap

The mapping from the model parameters to the active cells in the inversion. If None, the mapping is the identity map.

reference_modelNone, (n_param, ) numpy.ndarray

Reference model. If None, the reference model in the inversion is set to the starting model.

units

Units for the model parameters. Some regularization classes behave differently depending on the units; e.g. ‘radian’.

weights

Weight multipliers to customize the least-squares function. Each key points to a (n_cells, ) numpy.ndarray that is defined on the regularization.RegularizationMesh .

Notes

We define the regularization function (objective function) for smallness as:

$\phi (m) = \frac{1}{2} \int_\Omega \, w(r) \, \Big [ m(r) - m^{(ref)}(r) \Big ]^2 \, dv$

where $$m(r)$$ is the model, $$m^{(ref)}(r)$$ is the reference model and $$w(r)$$ is a user-defined weighting function.

For implementation within SimPEG, the regularization function and its variables must be discretized onto a mesh. The discretized approximation for the regularization function (objective function) is expressed in linear form as:

$\phi (\mathbf{m}) = \frac{1}{2} \sum_i \tilde{w}_i \, \bigg | \, m_i - m_i^{(ref)} \, \bigg |^2$

where $$m_i \in \mathbf{m}$$ are the discrete model parameter values defined on the mesh and $$\tilde{w}_i \in \mathbf{\tilde{w}}$$ are amalgamated weighting constants that 1) account for cell dimensions in the discretization and 2) apply any user-defined weighting. This is equivalent to an objective function of the form:

$\phi (\mathbf{m}) = \frac{1}{2} \Big \| \mathbf{W} \big [ \mathbf{m} - \mathbf{m}^{(ref)} \big ] \Big \|^2$

where

• $$\mathbf{m}^{(ref)}$$ is a reference model (set using reference_model), and

• $$\mathbf{W}$$ is the weighting matrix.

Custom weights and the weighting matrix:

Let $$\mathbf{w_1, \; w_2, \; w_3, \; ...}$$ each represent an optional set of custom cell weights. The weighting applied within the objective function is given by:

$\mathbf{\tilde{w}} = \mathbf{v} \odot \prod_j \mathbf{w_j}$

where $$\mathbf{v}$$ are the cell volumes. The weighting matrix used to apply the weights for smallness regularization is given by:

$\mathbf{W} = \textrm{diag} \Big ( \, \mathbf{\tilde{w}}^{1/2} \Big )$

Each set of custom cell weights is stored within a dict as an (n_cells, ) numpy.ndarray. The weights can be set all at once during instantiation with the weights keyword argument as follows:

>>> reg = Smallness(mesh, weights={'weights_1': array_1, 'weights_2': array_2})


or set after instantiation using the set_weights method:

>>> reg.set_weights(weights_1=array_1, weights_2=array_2})


The default weights that account for cell dimensions in the regularization are accessed via:

>>> reg.get_weights('volume')


Methods

 Evaluate the regularization kernel function. Derivative of the regularization kernel function.

## Galleries and Tutorials using SimPEG.regularization.Smallness#

Method of Equivalent Sources for Removing VRM Responses

Method of Equivalent Sources for Removing VRM Responses