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 givenmodelas argument.- Parameters:
- simulation
Simulation 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,)
arrayorNone, optional Array with data weights used to compute the sensitivty weights. Can use the
inversion_ideas.DataMisfit.weightsproperty.- 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.
- vmin
floatorNone, optional Minimum value used for clipping.
- simulation
Attributes
Transpose.
The data-type for the wrapped array.
Model used to compute the initial sensitivity weights.
Number of dimensions in the wrapped array.
Shape of the wrapped array.
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.
update(model, *args)Update sensitivity weights for the given model.
copy
Attributes#
- SensitivityWeights.dtype#
The data-type for the wrapped array.
- SensitivityWeights.initial_model#
Model used to compute the initial sensitivity weights.
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.maxupstream function
- SensitivityWeights.min(axis=None, out=None, **kwargs)#
Minimum value in the wrapped array along a given axis.
See also
numpy.minupstream function
- 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
updatemethod interface.
- model(