Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MultilevelChainSampler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Luca Lenz
MultilevelChainSampler
Commits
c65f71c9
Commit
c65f71c9
authored
11 months ago
by
Luca Lenz
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev'
parents
4d232d36
9f1e40d9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/make.jl
+1
-14
1 addition, 14 deletions
docs/make.jl
docs/src/index.md
+130
-8
130 additions, 8 deletions
docs/src/index.md
docs/src/usage/proposals.md
+0
-51
0 additions, 51 deletions
docs/src/usage/proposals.md
docs/src/usage/sampling.md
+0
-55
0 additions, 55 deletions
docs/src/usage/sampling.md
with
131 additions
and
128 deletions
docs/make.jl
+
1
−
14
View file @
c65f71c9
...
...
@@ -7,18 +7,5 @@ using StatsBase
using
AbstractMCMC
makedocs
(
sitename
=
"MultilevelChainSampler"
,
remotes
=
nothing
,
pages
=
[
"Package"
=>
"index.md"
,
"Usage"
=>
[
"usage/proposals.md"
,
"usage/sampling.md"
],
"References"
=>
"references.md"
]
sitename
=
"MultilevelChainSamplers"
,
remotes
=
nothing
,
)
deploydocs
(
#...
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docs/src/index.md
+
130
−
8
View file @
c65f71c9
# MultilevelChainSamplers.jl
Package
# MultilevelChainSamplers.jl
## About
```
@raw html
<h3> Table of contents </h3>
```
```
@contents
Depth=5
```
```
@raw html
<h3> Table of contents </h3>
```
MCMC Sampler for multilevel delayed acceptance.
##
Overview
##
Usage
Documentation
### Proposal generators
```
@contents
Pages = ["usage/proposals.md", "usage/sampling.md"]
Depth = 3
#### List of built-in proposals
```
@docs
StaticProposal
```
```
@docs
RandomWalk
```
```
@docs
TransformedProposal
```
```
@docs
StackedProposal
```
```
@docs
ComponentwiseProposal
```
#### Custom Proposal generator
To define a custom proposal inherit from the abstract type
```
julia
struct
MyProposal
<:
AbstractProposal
{
issymmetric
::
Bool
}
# ...
end
```
```
@docs
propose
```
Implement the sampling methods
-
initialization x₀ ~ p₀(⋅) by
`x₀ = propose(p)`
-
and transition y ~ q(⋅|x) by
`y = propose(p, x)`
## Index
```
julia
propose
(
rng
::
AbstractRNG
,
p
::
MyProposal
)
=
...
propose
(
rng
::
AbstractRNG
,
p
::
MyProposal
,
x
)
=
...
```
For symmetric proposals
`q(x|y) = q(y|x)`
and the likelihood ratio can be neglected.
For asymmetric proposals also implement method for calculating q(y|x)
```
julia
logpdf
(
p
::
AbstractProposal
{
false
},
x
,
y
)
=
...
```
### Sampling
Implements the
`AbstractMCMC`
sampling interface.
```
@raw html
More information can be found on the
<a href="https://turinglang.org/AbstractMCMC.jl"> AbstractMCMC.jl </a>
documentation page.
```
In a nutshell the sampling function takes the form
```
julia
sample
(
t
::
LogDensity
,
mh
::
Sampler
,
N_or_isdone
,
options
...
)
```
The target
`t`
is a logarithmic unnormalized probability density
```
@docs
LogDensity
```
In particular the options includes thread and process parallel sampling.
#### Metropolis Hastings (MH)
```
@docs
MH
```
Published in
[
[1]
](
#1
)
.
#### Multilevel Delayed Acceptance (MLDA)
Construct a multilevel proposal as vector of simple proposals.
```
@docs
MLDA
```
Published in
[
[1]
](
#2
)
.
## Reference
### Index
```
@index
```
### Citations
```
@raw html
<a
id=
"1"
>
[1]
</a>
Hastings, W.K. (1970).
"Monte Carlo Sampling Methods Using Markov Chains and Their Applications".
Biometrika, Volume 57, Issue 1
<br
/>
<a
id=
"2"
>
[2]
</a>
Mikkel B. Lykkegaard, T. Dodwell, C. Fox, Grigorios Mingas, Robert Scheichl (2022).
"Multilevel Delayed Acceptance MCMC"
SIAM/ASA J. Uncertain. Quantification
```
This diff is collapsed.
Click to expand it.
docs/src/usage/proposals.md
deleted
100644 → 0
+
0
−
51
View file @
4d232d36
# Proposal generators
## List of built-in proposals
```
@docs
StaticProposal
```
```
@docs
RandomWalk
```
```
@docs
TransformedProposal
```
```
@docs
StackedProposal
```
```
@docs
ComponentwiseProposal
```
## Custom Proposal generator
To define a custom proposal inherit from the abstract type
```
julia
struct
MyProposal
<:
AbstractProposal
{
issymmetric
::
Bool
}
# ...
end
```
```
@docs
propose
```
Implement the sampling methods
-
initialization x₀ ~ p₀(⋅) by
`x₀ = propose(p)`
-
and transition y ~ q(⋅|x) by
`y = propose(p, x)`
```
julia
propose
(
rng
::
AbstractRNG
,
p
::
MyProposal
)
=
...
propose
(
rng
::
AbstractRNG
,
p
::
MyProposal
,
x
)
=
...
```
For symmetric proposals
`q(x|y) = q(y|x)`
and the likelihood ratio can be neglected.
For asymmetric proposals also implement method for calculating q(y|x)
```
julia
logpdf
(
p
::
AbstractProposal
{
false
},
x
,
y
)
=
...
```
This diff is collapsed.
Click to expand it.
docs/src/usage/sampling.md
deleted
100644 → 0
+
0
−
55
View file @
4d232d36
# Sampling
Implements the
`AbstractMCMC`
sampling interface.
```
@raw html
More information can be found on the
<a href="https://turinglang.org/AbstractMCMC.jl"> AbstractMCMC.jl </a>
documentation page.
```
In a nutshell the sampling function takes the form
```
julia
sample
(
t
::
LogDensity
,
mh
::
Sampler
,
N_or_isdone
,
options
...
)
```
The target
`t`
is a logarithmic unnormalized probability density
```
@docs
LogDensity
```
In particular the options includes thread and process parallel sampling.
## Metropolis Hastings (MH)
```
@docs
MH
```
```
@raw html
<a id="1">[1]</a>
Hastings, W.K. (1970).
"Monte Carlo Sampling Methods Using Markov Chains and Their Applications".
Biometrika, Volume 57, Issue 1
```
## Multilevel Delayed Acceptance (MLDA)
Construct a multilevel proposal as vector of simple proposals.
```
@docs
MLDA
```
```
@raw html
<a id="2">[2]</a>
Mikkel B. Lykkegaard, T. Dodwell, C. Fox, Grigorios Mingas, Robert Scheichl (2022).
"Multilevel Delayed Acceptance MCMC"
SIAM/ASA J. Uncertain. Quantification
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment