Skip to content

bugfix pos-def matrix regularization#35

Merged
odunbar merged 1 commit intomainfrom
orad/new_pdmat_reg_eqn
Feb 28, 2023
Merged

bugfix pos-def matrix regularization#35
odunbar merged 1 commit intomainfrom
orad/new_pdmat_reg_eqn

Conversation

@odunbar
Copy link
Member

@odunbar odunbar commented Feb 24, 2023

Purpose

Closes #34
Closes #33

Content

  • fix pseudoinverse
  • remove batching for pseudoinverse calculation
  • update docs to inform users of additional computation with full p.d. regularization
  • protect cholesky with an @info if it is not positive definite, and then make it pos def by symmetrizing and add to diagonal
  • updated tests with new representation of covariance matrix and hyperparameter solves with a complexity term. FURTHER RESEARCH REQUIRED in the case of pos-def regularization here.

  • I have read and checked the items on the review checklist.

@odunbar odunbar force-pushed the orad/new_pdmat_reg_eqn branch from 0e2042a to a0bcb23 Compare February 24, 2023 04:55
@odunbar
Copy link
Member Author

odunbar commented Feb 24, 2023

bors r+

bors bot added a commit that referenced this pull request Feb 24, 2023
35: bugfix pos-def matrix regularization r=odunbar a=odunbar

<!--- THESE LINES ARE COMMENTED -->
## Purpose 
<!--- One sentence to describe the purpose of this PR, refer to any linked issues:
#14 -- this will link to issue 14
Closes #2 -- this will automatically close issue 2 on PR merge
-->
closes #34 

## Content
<!---  specific tasks that are currently complete 
- Solution implemented
-->
- fix pseudoinverse
- remove batching for pseudoinverse calculation
- update docs to inform users of additional computation with full p.d. regularization

<!---
Review checklist

I have:
- followed the codebase contribution guide: https://clima.github.io/ClimateMachine.jl/latest/Contributing/
- followed the style guide: https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/
- followed the documentation policy: https://github.com/CliMA/policies/wiki/Documentation-Policy
- checked that this PR does not duplicate an open PR.

In the Content, I have included 
- relevant unit tests, and integration tests, 
- appropriate docstrings on all functions, structs, and modules, and included relevant documentation.

-->

----
- [x] I have read and checked the items on the review checklist.


Co-authored-by: odunbar <odunbar@caltech.edu>
@bors
Copy link

bors bot commented Feb 24, 2023

This PR was included in a batch that successfully built, but then failed to merge into main. It will not be retried.

Additional information:

Response status code: 422
{"message":"At least 1 approving review is required by reviewers with write access.","documentation_url":"https://docs.github.com/articles/about-protected-branches"}

@odunbar odunbar force-pushed the orad/new_pdmat_reg_eqn branch 2 times, most recently from 48f4d56 to 956be48 Compare February 28, 2023 02:44
format

test

protect cholesky

modify tests to fit new covariance representation

test chol protection

make nugget size a keyword for chol protection

format
@odunbar odunbar force-pushed the orad/new_pdmat_reg_eqn branch from 616f2f1 to f5834ba Compare February 28, 2023 02:59
@odunbar odunbar merged commit 3ba7101 into main Feb 28, 2023
@bors bors bot deleted the orad/new_pdmat_reg_eqn branch February 28, 2023 18:35
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.

We should not be doing block pseudo-inverses If cholesky fails, revert to a default method

1 participant