Skip to content
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

Bijectors.ordered and MvLogNormal interaction .. only supported for unconstrained distributions. #295

Open
jae0 opened this issue Nov 30, 2023 · 1 comment

Comments

@jae0
Copy link

jae0 commented Nov 30, 2023

Hi, Working through the pPCA Tutorial.

(https://turing.ml/v0.21/tutorials/11-probabilistic-pca)

Everything working but the last part,

Section: Rotation Invariant Householder Parameterization for Bayesian PCA

In the Turing model "pPCA_householder", the sampling fails with error:

ERROR: ArgumentError: ordered transform is currently only supported for unconstrained distributions.
Stacktrace:  
[1] ordered(d::MvLogNormal{Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, FillArrays.Zeros{Float64, 1, Tuple{Base.OneTo{Int64}}}})
@ Bijectors ~/.julia/packages/Bijectors/QhObI/src/bijectors/ordered.jl:21

The key part seems to be:

sigma ~ Bijectors.ordered(MvLogNormal(MvNormal(ones(K))))

Maybe due to call to PDMats.PDiagMat? Any way around this? Thx!

Julia Version 1.9.4 (official release; 8e5136fa297)
[76274a88] + Bijectors v0.13.7
[fce5fe82] Turing v0.29.3
OS: Linux (x86_64-linux-gnu)

@torfjelde
Copy link
Member

Ah, yes we need to update this; thank you!

As a heads up: the tutorials are only guaranteed to be runnable for the specific package versions specified in the tutorial itself, e.g. https://turing.ml/v0.21/tutorials/11-probabilistic-pca#appendix . But we're of course aiming to keep them up to do date, so will address this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants