File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ using Distributions, Random, LinearAlgebra
2
+ using LogDensityProblems
3
+ using IrrationalConstants
4
+ using Plots
5
+
6
+
7
+ include (" targets/banana.jl" )
8
+ include (" targets/cross.jl" )
9
+ include (" targets/neal_funnel.jl" )
10
+ include (" targets/warped_gaussian.jl" )
11
+
12
+
13
+ function load_model (name:: String )
14
+ if name == " Banana"
15
+ return Banana (2 , 1.0 , 10.0 )
16
+ elseif name == " Cross"
17
+ return Cross ()
18
+ elseif name == " Funnel"
19
+ return Funnel (2 )
20
+ elseif name == " WarpedGaussian"
21
+ return WarpedGauss ()
22
+ else
23
+ error (" Model not defined" )
24
+ end
25
+ end
26
+
27
+ LogDensityProblems. dimension (dist:: ContinuousDistribution ) = length (dist)
28
+ LogDensityProblems. logdensity (dist:: ContinuousDistribution , x) = logpdf (dist, x)
29
+
You can’t perform that action at this time.
0 commit comments