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
meshdiscretize.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 or int, optional

List of active cell indices, or a mesh.n_cells boolean array describing active cells.

alpha_sfloat, optional

Smallness weight

alpha_x, alpha_y, alpha_zfloat or None, optional

First order smoothness weights for the respective dimensions. None implies setting these weights using the length_scale parameters.

alpha_xx, alpha_yy, alpha_zzfloat, optional

Second order smoothness weights for the respective dimensions.

length_scale_x, length_scale_y, length_scale_zfloat, optional

First order smoothness length scales for the respective dimensions.

mappingSimPEG.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.

weightsNone, 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.

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

active_cells

Indices of active cells in the mesh

alpha_s

smallness weight

alpha_x

weight for the first x-derivative

alpha_xx

weight for the second x-derivative

alpha_y

weight for the first y-derivative

alpha_yy

weight for the second y-derivative

alpha_z

weight for the first z-derivative

alpha_zz

weight for the second z-derivative

indActive

active_cells.indActive has been deprecated.

length_scale_x

Constant multiplier of the base length scale on model gradients along x.

length_scale_y

Constant multiplier of the base length scale on model gradients along y.

length_scale_z

Constant multiplier of the base length scale on model gradients along z.

mapping

Mapping applied to the model values

model

Physical property model

mref

reference_model.mref has been deprecated.

multipliers

Factors that multiply the objective functions that are summed together to build to composite regularization

nP

number of model parameters

reference_model

Reference physical property model

reference_model_in_smooth

Use the reference model in the model gradient penalties.

regularization_mesh

Regularization mesh

units

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#

Maps: ComboMaps

Maps: ComboMaps

PF: Gravity: Tiled Inversion Linear

PF: Gravity: Tiled Inversion Linear

Magnetic inversion on a TreeMesh

Magnetic inversion on a TreeMesh

Magnetic Amplitude inversion on a TreeMesh

Magnetic Amplitude inversion on a TreeMesh

3D DC inversion of Dipole Dipole array

3D DC inversion of Dipole Dipole array

Parametric DC inversion with Dipole Dipole array

Parametric DC inversion with Dipole Dipole array

2D inversion of Loop-Loop EM Data

2D inversion of Loop-Loop EM Data

EM: TDEM: 1D: Inversion

EM: TDEM: 1D: Inversion

EM: TDEM: 1D: Inversion with VTEM waveform

EM: TDEM: 1D: Inversion with VTEM waveform

FLOW: Richards: 1D: Inversion

FLOW: Richards: 1D: Inversion

Petrophysically guided inversion (PGI): Linear example

Petrophysically guided inversion (PGI): Linear example

Petrophysically guided inversion: Joint linear example with nonlinear relationships

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 and SkyTEM Bookpurnong Inversions

Heagy et al., 2017 1D RESOLVE Bookpurnong Inversion

Heagy et al., 2017 1D RESOLVE Bookpurnong Inversion

Heagy et al., 2017 1D FDEM and TDEM inversions

Heagy et al., 2017 1D FDEM and TDEM inversions

PF: Gravity: Laguna del Maule Bouguer Gravity

PF: Gravity: Laguna del Maule Bouguer Gravity

Straight Ray with Volume Data Misfit Term

Straight Ray with Volume Data Misfit Term

1D Inversion of for a Single Sounding

1D Inversion of for a Single Sounding

Linear Least-Squares Inversion

Linear Least-Squares Inversion

Sparse Inversion with Iteratively Re-Weighted Least-Squares

Sparse Inversion with Iteratively Re-Weighted Least-Squares

Sparse Norm Inversion for Total Magnetic Intensity Data on a Tensor Mesh

Sparse Norm Inversion for Total Magnetic Intensity Data on a Tensor Mesh

2.5D DC Resistivity and IP Least-Squares Inversion

2.5D DC Resistivity and IP Least-Squares Inversion

3D Least-Squares Inversion of DC and IP Data

3D Least-Squares Inversion of DC and IP Data

Sparse Norm Inversion of 2D Seismic Tomography Data

Sparse Norm Inversion of 2D Seismic Tomography Data

Least-Squares 1D Inversion of Sounding Data

Least-Squares 1D Inversion of Sounding Data

Sparse 1D Inversion of Sounding Data

Sparse 1D Inversion of Sounding Data

Parametric 1D Inversion of Sounding Data

Parametric 1D Inversion of Sounding Data

2.5D DC Resistivity Least-Squares Inversion

2.5D DC Resistivity Least-Squares Inversion

2.5D DC Resistivity Inversion with Sparse Norms

2.5D DC Resistivity Inversion with Sparse Norms

3D Least-Squares Inversion of DC Resistivity Data

3D Least-Squares Inversion of DC Resistivity Data

1D Inversion of Time-Domain Data for a Single Sounding

1D Inversion of Time-Domain Data for a Single Sounding

Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data

Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data

Least-Squares Inversion of Gravity Anomaly Data

Least-Squares Inversion of Gravity Anomaly Data

Sparse Norm Inversion of Gravity Anomaly Data

Sparse Norm Inversion of Gravity Anomaly Data