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

docs typos in Prior Distributions #256

Closed
haakon-e opened this issue Feb 28, 2023 · 0 comments · Fixed by #258
Closed

docs typos in Prior Distributions #256

haakon-e opened this issue Feb 28, 2023 · 0 comments · Fixed by #258
Assignees

Comments

@haakon-e
Copy link
Member

The second example code block under Example combining several distributions doesn't work:

diag_val = 0.5 * ones(3)
udiag_val = 0.25 * ones(1)
mean = ones(4)
covariance = SymTridiagonal(diagonal_val, udiag_val)
d1 = Parameterized(MvNormal(mean, covariance)) # 4D multivariate normal

some dimensions didn't match up, there were some variable names mismatch, and constructing MvNormal from a SymTridiagonal didn't work for me (I had to convert to a regular matrix).

This should work:

using LinearAlgebra  # note: needed for `SymTridiagonal`
import EnsembleKalmanProcesses.Distributions: MvNormal  # needed for `MvNormal`
diagonal_val = 0.5 * ones(3)
udiag_val = 0.25 * ones(2)
mean = ones(3)
covariance = Matrix(SymTridiagonal(diagonal_val, udiag_val))
d1 = Parameterized(MvNormal(mean, covariance)) # 3D multivariate normal
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

Successfully merging a pull request may close this issue.

2 participants