-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbstractPDMat restriction causes problems #1219
Comments
Related: #940 |
workaround for some cases: https://github.com/invenia/PDMatsExtras.jl |
In my experience, there's essentially no benefit to carrying around the full covariance matrix; it works just fine to work in terms of the positive semidefinite Cholesky factor, or even better (for Beyond the PDS requirement, PDMats has the unusual approach "allocate no matter what". Give it a |
This pops up quite regularly, I think it would be good to add support for an |
Agreed, most of the overloads that use |
Another one came up, we have a MvGaussian that has a block diagonal structure. BlockDiagonals.jl doesn't know anything about PDMats. |
So often the AbstractPDMat restriction on MvNormal and other Multivariate distributions causes pain.
Discussed in slack with @timholy and @andreasnoack that i had a problem creating a Positive Definate Woodbury Matrix.
Woodbury.jl wants it ot subtype Factorization,
but for it to work with Distributions.jl it needs to subtype
AbstractPDMat
.A positive definate woodbury matrix is actually just a
SymWoodbury
with a few extra contraints about nonnegatives on diagonals.So ideally would actually just use
SymWoodbury
.Other examples include if I wanted to work with a NamedDimsArray or KeyedArray, or some other AxisArray, and/or their respective factorizations.
With very little effort one can get an indexed distribution as output -- if we could use indexed types within the internals.
I propose that the covariences be relaxed so some mininal set of operations that must be defined; and maybe to passing
LinearAlgebra.isposdef
The minimal set of operations would be something like
inv
.Then we can special case
AbstractPDMat
to use fasterinvquad
.And we can special case
Matrix
inputs to be converted toPDMat
s.But other inputs can stay as they are.
We can quite likely support any
AbstractMatrix
and even some Factorization subtypes, via ducktyping.The text was updated successfully, but these errors were encountered: