-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare inversion methods for ESMDA #165
Comments
Some results on memoryRan only this test in the test suite, using def test_esmda_inversion_memory():
num_outputs=1000
num_inputs=100_000
ensemble_members=100
C_D_diag = np.exp(np.random.randn(num_outputs))
assert C_D_diag.ndim == 1
# Set alpha to something other than 1 to test that it works
alpha = 3
# Create observations
D = np.random.randn(num_outputs, ensemble_members)
Y = np.random.randn(num_outputs, ensemble_members)
X = np.random.randn(num_inputs, ensemble_members)
# Base memory:
# Total memory allocated: 9.2MiB when
# num_outputs=1000
# num_inputs=10000
# ensemble_members=100
# num_outputs=1000
# num_inputs=10000
# ensemble_members=100
# inversion_exact_cholesky 91.3MiB
# inversion_subspace 86.2MiB
# inversion_exact_subspace_woodbury 92.1MiB
# inversion_rescaled_subspace 87.0MiB
# num_outputs=10000
# num_inputs=1000
# ensemble_members=100
# inversion_exact_cholesky 914.0MiB
# inversion_subspace 128.2MiB
# inversion_exact_subspace_woodbury 1.6GiB
# inversion_rescaled_subspace 127.2MiB
# num_outputs=1000
# num_inputs=100_000
# ensemble_members=100
# inversion_exact_cholesky 229.6MiB
# inversion_subspace 223.5MiB
# inversion_exact_subspace_woodbury 229.5MiB
# inversion_rescaled_subspace 223.4MiB
func = inversion_rescaled_subspace
result_matrix = func(alpha=alpha, C_D=C_D_diag, D=D, Y=Y, X=X) Some results on time
|
I am surprised by these results as I thought exact cholesky with diagonal covariance would be the fastest. |
eivindjahren
added
christmas-review
Issues and PRs for Christmas review
and removed
christmas-review
Issues and PRs for Christmas review
labels
Dec 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I wrote ESMDA I implemented several inversion methods, that is, ways of computing
We should benchmark these and bring the best ones into the public ESMDA API. More specifically:
The text was updated successfully, but these errors were encountered: