inversion_ideas.hyperparams.SensitivityWeights#

class inversion_ideas.hyperparams.SensitivityWeights(simulation, initial_model, *, data_weights=None, volumes=None, vmin=1e-12)#

Updatable sensitivity weights.

This class wraps a sensitivity weights array that can be updated by calling the update() method, passing a given model as argument.

Parameters:
simulationSimulation

Simulation used to get the jacobian matrix that will be used while updating the sensitivity weights.

initial_model(n_params) array

Initial model used to initialize the sensitivity weights.

data_weights(n_data,) array or None, optional

Array with data weights used to compute the sensitivty weights. Can use the inversion_ideas.DataMisfit.weights property.

volumes(n_params) array

Array with the volumes of the active cells. Sensitivity weights are divided by the volumes to account for sensitivity changes due to cell sizes.

vminfloat or None, optional

Minimum value used for clipping.

Attributes

T

Transpose.

dtype

The data-type for the wrapped array.

initial_model

Model used to compute the initial sensitivity weights.

ndim

Number of dimensions in the wrapped array.

shape

Shape of the wrapped array.

size

Total number of elements in the wrapped array.

Methods

max([axis, out])

Maximum value in the wrapped array along a given axis.

min([axis, out])

Minimum value in the wrapped array along a given axis.

transpose()

Transpose.

update(model, *args)

Update sensitivity weights for the given model.

copy

Attributes#

SensitivityWeights.T#

Transpose.

Returns:
array
SensitivityWeights.dtype#

The data-type for the wrapped array.

SensitivityWeights.initial_model#

Model used to compute the initial sensitivity weights.

SensitivityWeights.ndim#

Number of dimensions in the wrapped array.

Returns:
int
SensitivityWeights.shape#

Shape of the wrapped array.

Returns:
tuple of int
SensitivityWeights.size#

Total number of elements in the wrapped array.

Returns:
int

Methods#

Methods documentation

SensitivityWeights.copy()#

SensitivityWeights.max(axis=None, out=None, **kwargs)#

Maximum value in the wrapped array along a given axis.

See also

numpy.max

upstream function


SensitivityWeights.min(axis=None, out=None, **kwargs)#

Minimum value in the wrapped array along a given axis.

See also

numpy.min

upstream function


SensitivityWeights.transpose()#

Transpose.

Returns:
array

SensitivityWeights.update(model, *args)#

Update sensitivity weights for the given model.

Parameters:
model(n_params) array

Array with model parameters that will be used to update the sensitivity weights.

*args

Any extra argument will be ignored. They are kept to guarantee compatibility with the update method interface.