Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olivierverdier/pdmatssingular.jl
An extension of PDMats to use singular covariance matrices
https://github.com/olivierverdier/pdmatssingular.jl
Last synced: about 5 hours ago
JSON representation
An extension of PDMats to use singular covariance matrices
- Host: GitHub
- URL: https://github.com/olivierverdier/pdmatssingular.jl
- Owner: olivierverdier
- License: mit
- Created: 2024-07-15T19:54:54.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T07:10:59.000Z (3 months ago)
- Last Synced: 2024-08-29T08:38:49.272Z (3 months ago)
- Language: Julia
- Homepage: https://olivierverdier.github.io/PDMatsSingular.jl/
- Size: 221 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDMatsSingular
[![Build Status](https://github.com/olivierverdier/PDMatsSingular.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/olivierverdier/PDMatsSingular.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/olivierverdier/PDMatsSingular.jl/graph/badge.svg?token=oHxH3LVZ9a)](https://codecov.io/gh/olivierverdier/PDMatsSingular.jl)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://olivierverdier.github.io/PDMatsSingular.jl/)This package allows to use `PDMats` with singular covariance matrices.
For instance:
```julia
Σ = covariance_from([1; 0;;])
```
Then:
```julia
Matrix(Σ)
```
gives
```
2×2 Matrix{Int64}:
1 0
0 0
```The random variable with this covariance can be sampled as follows.
With
```julia
rng = Random.default_rng()
``````julia
sample(rng, Σ)
```
gives samples with the singular covariance above, that is, the second component is guaranteed to be zero.