-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implement eigh() fallback #493
base: main
Are you sure you want to change the base?
Implement eigh() fallback #493
Conversation
for more information, see https://pre-commit.ci
We could cherry pick the rng commit to another PR, I just opened the branch for all thing covariance related as a tryout in the beginning. |
Before I fix the rest of the tests, could you look at it @mathause. I don't think it's pretty what I did to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I made a suggestion how we can potentially avoid changeable
. It would be nice to have a separate PR about the random generator but I also see that they are intricately linked...
for more information, see https://pre-commit.ci
Note: diff works better with ignore whitespace |
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #493 +/- ##
==========================================
+ Coverage 61.36% 61.51% +0.14%
==========================================
Files 50 50
Lines 3572 3588 +16
==========================================
+ Hits 2192 2207 +15
- Misses 1380 1381 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks that looks good and clean. One last thing we could do (and I leave it up to you): define _ecov_crossvalidation = _EcovCrossvalidation()
and rename crossvalidate
to __call__
, then we can call _ecov_crossvalidation(...)
again as before (but then this function is purely internal...)
Oh and some of the tests emit warnings - can you suppress them? E.g.: mesmer/tests/integration/test_volc.py Line 62 in 6e937ff
or in a |
Co-authored-by: Mathias Hauser <[email protected]>
Co-authored-by: Mathias Hauser <[email protected]>
Stumbled upon #187. Just wanted to mention it here, but it seems like it does not necessarily speak against allowing singular true? |
I think the problem in #187 was that certain folds did not contribute to the nll. We should make sure this doesn't happen. Need to take a look at the code... |
* date_range: update freq string * add freq conditionals
* add mesmer_m example script * changelog * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove unused imports * adjustments * replace script with notebook * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * restructure and add some headings * remove inputs * add some comments * typos * date_range: update freq string (MESMER-group#504) * date_range: update freq string * add freq conditionals * reference: only year as link (MESMER-group#505) * nits * more info on time coordinate * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update comment & clear output --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Mathias Hauser <[email protected]> Co-authored-by: Mathias Hauser <[email protected]>
for more information, see https://pre-commit.ci
Another not so nice side effect about all of this is that if we select a singular covariance matrix and use eigh for drawing samples this could lead to slight differences in the emulations between machines... |
Maybe this is the solution to go for. Also because an ostrich looks very similar to an emu. |
Implement switch to set that per default, it will error if the matrix is singular |
I've avoided reviewing this because I am unsure what's best (different results on different OSs is annoying but prob. unavoidable, however, if #187 happens it would be bad). Should/ can we wait for #521 so we can easily play with different models / scenarios before deciding here? (I think there were models with singular matrices for Lea, maybe only in CMIP5.) |
Okay |
Implement eigh() as a fallback for loglikelihood estimation in covariance localization. Since physically, the covariance matrix can be positive semidefinite we should allow singular true. I also implemented some bug fixes mentioned in #413.
CHANGELOG.rst