SimPEG.regularization.BaseSparse#
- class SimPEG.regularization.BaseSparse(mesh, norm=2.0, irls_scaled=True, irls_threshold=1e-08, **kwargs)[source]#
Bases:
BaseRegularizationBase class for sparse-norm regularization.
The
BaseSparseclass defines properties and methods inherited by sparse-norm regularization classes. Sparse-norm regularization in SimPEG is implemented using an iteratively re-weighted least squares (IRLS) approach. TheBaseSparseclass however, is not directly used to define the regularization for the inverse problem.- Parameters:
- mesh
SimPEG.regularization.RegularizationMesh,discretize.base.BaseMesh Mesh on which the regularization is discretized. This is not necessarily the same as the mesh on which the simulation is defined.
- active_cells
None, (n_cells, )numpy.ndarrayofbool Boolean array defining the set of
RegularizationMeshcells that are active in the inversion. IfNone, all cells are active.- mapping
None,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_model
None, (n_param, )numpy.ndarray Reference model values used to constrain the inversion. If
None, the starting model is set as the reference model.- units
None,str Units for the model parameters. Some regularization classes behave differently depending on the units; e.g. ‘radian’.
- weights
None,dict Weight multipliers to customize the least-squares function. Each key points to a (n_cells, ) numpy.ndarray that is defined on the
RegularizationMesh.- norm
float The norm used in the regularization function. Must be between within the interval [0, 2].
- irls_scaledbool
If
True, scale the IRLS weights to preserve magnitude of the regularization function. IfFalse, do not scale.- irls_threshold
float Constant added to IRLS weights to ensures stability in the algorithm.
- mesh
Attributes
Scale IRLS weights.
Stability constant for computing IRLS weights.
Norm for the sparse regularization.
Methods
get_lp_weights(f_m)Compute and return iteratively re-weighted least-squares (IRLS) weights.