We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PosDefException: matrix is not positive definite; Cholesky factorization failed
julia v1.10.2 Turing v0.30.7 Distributions v0.25.107
Using Wishart priors results in several functions throwing the above error, which does not make sense to me, e.g. in this MWE maximizing:
using Turing, MCMCChains using Statistics, LinearAlgebra, PDMats using Optim # parameter of the Wishart prior A = Matrix{Float64}(I, 3, 3); isposdef(A) # true ishermitian(A) # true @model function demo(x) _A ~ Wishart(5, A); _x_mu = sum(_A); return x ~ Normal(_x_mu, 1); end # condition model on single obs demo_model = demo(1.0); map_estimate = optimize(demo_model, MAP()); # error chain = sample(model, HMC(0.05, 10), 1000); # error chain = sample(model, MH(), 1000); # no error
MAP() throws an error, as does sampling with HMC and NUTS, but not with MH.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
julia v1.10.2
Turing v0.30.7
Distributions v0.25.107
Using Wishart priors results in several functions throwing the above error, which does not make sense to me, e.g. in this MWE maximizing:
MAP() throws an error, as does sampling with HMC and NUTS, but not with MH.
The text was updated successfully, but these errors were encountered: