Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmcclintock/covariance_breakdown
A small package to breakdown a covariance matrix into constituent parts useful for building emulators.
https://github.com/tmcclintock/covariance_breakdown
Last synced: 26 days ago
JSON representation
A small package to breakdown a covariance matrix into constituent parts useful for building emulators.
- Host: GitHub
- URL: https://github.com/tmcclintock/covariance_breakdown
- Owner: tmcclintock
- License: mit
- Created: 2018-12-13T20:41:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T17:34:22.000Z (almost 6 years ago)
- Last Synced: 2024-10-27T11:08:36.818Z (2 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 375 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# covariance_breakdown
Constructing emulators of covariance matrices requires first breaking the matrix down into its constituent parts using a decomposition, and then rearranging diagonal and lower triangular data into a more useful form. This is a small package to do that.
Specifically, this packages takes in a covariance matrix, tests that it _can_ be decomposed, performs generalised Cholesky decomposition, and saves:
- the lower triangular matrix `L`
- the diagonal of the GCD `D` (which is in L)
- the flattened independent elements of L that aren't in D, `Lprime`Additionally, the `breakdown` tool can reconstruct a covariance (and all the other parts) from `D` and `Lprime`.
## Usage
```python
#Given a covariance matrix Cfrom covariance_breakdown import *
C_breakdown = breakdown(C)
C_attr = C_breakdown.C #saves C as an attribute
D = C_breakdown.D
L = C_breakdown.L
Lprime = C_breakdown.LprimeC_breakdown2 = breakdown.from_D_Lprime(D, Lprime)
#Has all the same attributes as C_breakdown
```