SimPEG.regularization.WeightedLeastSquares#
- class SimPEG.regularization.WeightedLeastSquares(mesh, active_cells=None, alpha_s=1.0, alpha_x=None, alpha_y=None, alpha_z=None, alpha_xx=0.0, alpha_yy=0.0, alpha_zz=0.0, length_scale_x=None, length_scale_y=None, length_scale_z=None, mapping=None, reference_model=None, reference_model_in_smooth=False, weights=None, **kwargs)[source]#
Bases:
SimPEG.objective_function.ComboObjectiveFunction
Weighted least squares measure on model smallness and smoothness.
L2 regularization with both smallness and smoothness (first order derivative) contributions.
- Parameters
- mesh
discretize.base.BaseMesh
The mesh on which the model parameters are defined. This is used for constructing difference operators for the smoothness terms.
- active_cellsarray_like
of
bool orint
,optional
List of active cell indices, or a mesh.n_cells boolean array describing active cells.
- alpha_s
float
,optional
Smallness weight
- alpha_x, alpha_y, alpha_z
float
orNone
,optional
First order smoothness weights for the respective dimensions. None implies setting these weights using the length_scale parameters.
- alpha_xx, alpha_yy, alpha_zz
float
,optional
Second order smoothness weights for the respective dimensions.
- length_scale_x, length_scale_y, length_scale_z
float
,optional
First order smoothness length scales for the respective dimensions.
- mapping
SimPEG.maps.IdentityMap
,optional
A mapping to apply to the model before regularization.
- reference_modelarray_like,
optional
- reference_model_in_smoothbool,
optional
Whether to include the reference model in the smoothness terms.
- weights
None
, array_like,or
dict
or array_like,optional
User defined weights. It is recommended to interact with weights using the get_weights, set_weights functionality.
- mesh
Notes
The function defined here approximates:
\[\phi_m(\mathbf{m}) = \alpha_s \| W_s (\mathbf{m} - \mathbf{m_{ref}} ) \|^2 + \alpha_x \| W_x \frac{\partial}{\partial x} (\mathbf{m} - \mathbf{m_{ref}} ) \|^2 + \alpha_y \| W_y \frac{\partial}{\partial y} (\mathbf{m} - \mathbf{m_{ref}} ) \|^2 + \alpha_z \| W_z \frac{\partial}{\partial z} (\mathbf{m} - \mathbf{m_{ref}} ) \|^2\]Note if the key word argument reference_model_in_smooth is False, then mref is not included in the smoothness contribution.
If length scales are used to set the smoothness weights, alphas are respectively set internally using: >>> alpha_x = (length_scale_x * min(mesh.edge_lengths)) ** 2
Attributes
Indices of active cells in the mesh
smallness weight
weight for the first x-derivative
weight for the second x-derivative
weight for the first y-derivative
weight for the second y-derivative
weight for the first z-derivative
weight for the second z-derivative
active_cells.indActive has been deprecated.
Constant multiplier of the base length scale on model gradients along x.
Constant multiplier of the base length scale on model gradients along y.
Constant multiplier of the base length scale on model gradients along z.
Mapping applied to the model values
Physical property model
reference_model.mref has been deprecated.
Factors that multiply the objective functions that are summed together to build to composite regularization
number of model parameters
Reference physical property model
Use the reference model in the model gradient penalties.
Regularization mesh
Specify the model units.
cell_weights
Methods
remove_weights
(key)removes weights in children objective functions
set_weights
(**weights)Update weights in children objective functions
Galleries and Tutorials using SimPEG.regularization.WeightedLeastSquares
#
PF: Gravity: Tiled Inversion Linear
Magnetic inversion on a TreeMesh
Magnetic Amplitude inversion on a TreeMesh
3D DC inversion of Dipole Dipole array
Parametric DC inversion with Dipole Dipole array
2D inversion of Loop-Loop EM Data
EM: TDEM: 1D: Inversion with VTEM waveform
Petrophysically guided inversion (PGI): Linear example
Petrophysically guided inversion: Joint linear example with nonlinear relationships
Heagy et al., 2017 1D RESOLVE and SkyTEM Bookpurnong Inversions
Heagy et al., 2017 1D RESOLVE Bookpurnong Inversion
Heagy et al., 2017 1D FDEM and TDEM inversions
PF: Gravity: Laguna del Maule Bouguer Gravity
Straight Ray with Volume Data Misfit Term
1D Inversion of for a Single Sounding
Linear Least-Squares Inversion
Sparse Inversion with Iteratively Re-Weighted Least-Squares
Sparse Norm Inversion for Total Magnetic Intensity Data on a Tensor Mesh
2.5D DC Resistivity and IP Least-Squares Inversion
3D Least-Squares Inversion of DC and IP Data
Sparse Norm Inversion of 2D Seismic Tomography Data
Least-Squares 1D Inversion of Sounding Data
Sparse 1D Inversion of Sounding Data
Parametric 1D Inversion of Sounding Data
2.5D DC Resistivity Least-Squares Inversion
2.5D DC Resistivity Inversion with Sparse Norms
3D Least-Squares Inversion of DC Resistivity Data
1D Inversion of Time-Domain Data for a Single Sounding
Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data
Least-Squares Inversion of Gravity Anomaly Data
Sparse Norm Inversion of Gravity Anomaly Data