Skip to content

Commit

Permalink
update LKJ test
Browse files Browse the repository at this point in the history
  • Loading branch information
cscherrer committed Jul 11, 2021
1 parent fb18a0a commit 270f8bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ end
end

@testset "LKJCholesky" begin
D = LKJCholesky{4}{(,)}
par = transform(asparams(D), randn(1))
d = D(par)
@test params(d) == par
D = LKJCholesky{(:k,)}
par = transform(asparams(D, (k=4,)), randn(1))
d = D(merge((k=4,),par))
# @test params(d) == par

η = par.η
logη = log(η)

y = rand(d)
η = par.η
= logdensity(LKJCholesky{4}(η), y)
@test logdensity(LKJCholesky{4}(logη=logη), y)
= logdensity(LKJCholesky(4,η), y)
@test logdensity(LKJCholesky(k=4,logη=logη), y)
end
end

Expand Down

0 comments on commit 270f8bb

Please sign in to comment.