PDMatsSingular.jl

An extension of PDMats to use singular covariance matrices
Author olivierverdier
Popularity
0 Stars
Updated Last
3 Months Ago
Started In
July 2024

PDMatsSingular

Build Status codecov

This package allows to use PDMats with singular covariance matrices.

For instance:

Σ = covariance_from([1; 0;;])

Then:

Matrix(Σ)

gives

2×2 Matrix{Int64}:
 1  0
 0  0

The random variable with this covariance can be sampled as follows. With

rng = Random.default_rng()
sample(rng, Σ)

gives samples with the singular covariance above, that is, the second component is guaranteed to be zero.

Required Packages

Used By Packages

No packages found.