-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
227: Low rank normalization 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 #225 ## Content <!--- specific tasks that are currently complete - Solution implemented --> - Based on the idea that the covariance defines geometrically a linear transformation from white noise to the data noise, ensemble covariance ``C`` can be viewed as ``C = R S S R^{-1}`` where ``R`` is a rotation, and ``S`` is the sqrt of the singular values of ``C``. The transformation from white data to the actual data samples is ``C^{1/2} = RS`` and it's "whitening" inverse is ``C^{-1/2} = S^{-1}R^{-1} = S^{-1}R^T`` as ``R`` is a rotation. For rank deficient ``C``, we take the normalization to be instead ``Sinv R^T`` where ``Sinv`` is Diagonal with the first ``rank(C)`` entries equal to ``S^{-1}``, and zero otherwise. - Added tests to check the covariances become close to the identity in full or low-dim subspace after normalization - Changed an input-dim consistency check to account for new dimension change <!--- 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. --> ---- - [ ] I have read and checked the items on the review checklist. Co-authored-by: odunbar <odunbar@caltech.edu>
- Loading branch information
Showing
2 changed files
with
84 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters