Skip to content
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

Transpose input to get nr prim components #9921

Merged

Conversation

larsevj
Copy link
Contributor

@larsevj larsevj commented Jan 30, 2025

We center the responses by mean(axis=0), thus the nr_observations need to be the column dimension.

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@larsevj larsevj added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Jan 30, 2025
Copy link

codspeed-hq bot commented Jan 30, 2025

CodSpeed Performance Report

Merging #9921 will improve performances by 12.99%

Comparing larsevj:transpose_input_to_get_nr_prim_components (db99249) with main (201c2c4)

Summary

⚡ 1 improvements
✅ 24 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_load_from_context[gen_x: 20, sum_x: 20 reals: 10] 7.1 ms 6.2 ms +12.99%

- Fixes bug that crept in when moving from Semeio.
- The singular values are invariant to transposition, however the
centering of the matrix depends upon the matrix orientation.
- np.mean(x, axis=0) will calculate mean for each column, and so we need
to ensure that the input is of dim (nr_realizations, nr_observations).
@larsevj larsevj force-pushed the transpose_input_to_get_nr_prim_components branch from d472ff0 to db99249 Compare January 31, 2025 09:36
@larsevj larsevj merged commit c6128f7 into equinor:main Jan 31, 2025
27 checks passed
@larsevj larsevj deleted the transpose_input_to_get_nr_prim_components branch January 31, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants