Skip to content

TaperedAdaptiveESMDA - #332

Merged
tommyod merged 10 commits into
equinor:mainfrom
tommyod:TaperedAdaptiveESMDA
Mar 20, 2026
Merged

TaperedAdaptiveESMDA#332
tommyod merged 10 commits into
equinor:mainfrom
tommyod:TaperedAdaptiveESMDA

Conversation

@tommyod

@tommyod tommyod commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/iterative_ensemble_smoother/esmda_adaptive.py Outdated
...
... for param_idx in yield_param_indices():
... X[param_idx, :] = smoother.assimilate_batch(X=X[param_idx, :],
... correlation_callback=smoother.inflation_scale)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels somewhat circular to pass smoother.inflation_scale to smoother.assimilate_batch.
Could we instead make self.inflation_scale the default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree! this should be standardized for all methods that take callback. one option is None, string, or custom callback function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two options:

  • a string (default) that refers to the paper (then we can extend with several strings if we want to in the future)
  • a callback (which can include the "identity" callback which reduces this method to ESMDA)

# - f(x <= beta * d) = 1
# - f(x >= d) = E_max

E_max = 8.0 # Maximum inflation factor

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not read the paper in detail yet, but this seems to be a "magic" number that might just be valid for the specific problem they are solving in the paper.
Perhaps we could just point to the paper and say see FIG. 11 and discussion on page 2603 or something like that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these numbers are indeed magic numbers

Comment thread src/iterative_ensemble_smoother/esmda_adaptive.py
N_m, N_e = X.shape # (num_parameters, ensemble_size)
assert N_e == self.delta_DT.shape[0], "Dimension mismatch"

delta_M = self._compute_delta_M(X=X, missing=missing)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not something we need to think about in this PR, but let's have a chat about using M or X (or both) to represent the parameter matrix.

Comment thread src/iterative_ensemble_smoother/esmda_adaptive.py Outdated
Comment thread src/iterative_ensemble_smoother/esmda_adaptive.py Outdated
Comment thread src/iterative_ensemble_smoother/esmda_adaptive.py Outdated
delta_D = self.delta_DT.T

# Loop over every parameter index i
for i in range(corr_XY.shape[0]):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want to prematurely optimize, but a hack we could perhaps use here is to quantize inflation_factors to a small set of levels and use a variant of the groupby_rows trick.
Just jotting it down so we can discuss.

@tommyod
tommyod merged commit 454fa36 into equinor:main Mar 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants