Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psimpy
Manage
Activity
Members
Labels
Plan
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
mbd
psimpy
Commits
eb2803bc
Commit
eb2803bc
authored
2 years ago
by
Hu Zhao
Browse files
Options
Downloads
Patches
Plain Diff
docs: add description of metropolis hastings sampling
parent
7b48a6ce
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/sampler/metropolis_hastings.rst
+21
-0
21 additions, 0 deletions
docs/source/sampler/metropolis_hastings.rst
with
21 additions
and
0 deletions
docs/source/sampler/metropolis_hastings.rst
+
21
−
0
View file @
eb2803bc
Metropolis Hastings Sampling
Metropolis Hastings Sampling
============================
============================
Metropolis Hastings sampling is a widely used Markov Chain Monte Carlo (MCMC)
algorithm for generating a sequence of samples from a target probability
distribution where direct sampling is difficult. The samples can be used to
estimate properties of the target distribution, like its mean, variance, and higher
moments. The samples can also be used to approximate the target distribution,
for example via a histogram. The algorithm works by constructing a Markov chain
with a stationary distribution equal to the target distribution.
Steps of the algorithm are as follows:
1. Choose an initial state for the Markov chain, usually from the target distribution.
2. At each iteration, propose a new state by sampling from a proposal distribution.
3. Calculate the acceptance probability.
4. Accept or reject the proposed state based on the acceptance probability.
5. Repeat steps 2-4 for a large number of iterations to obtain a sequence of samples.
6. Apply "burn-in" and "thining".
Final samples from the Markov chain can then be used to estimate the target
distribution or its properties.
MetropolisHastings Class
MetropolisHastings Class
------------------------
------------------------
...
...
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