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

Added a section to the MCMC example explaining the importance of crit… #43

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Examples/09-mcmc-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,22 @@
"source": [
"Due to the prior, the posterior mean has shifted down from approximately 11.5 to approximate 11.34"
]
},
{
"cell_type": "markdown",
"id": "5bec599b-509f-4ce0-98d5-91550fb12258",
"metadata": {},
"source": [
"## Importance of parameter range and burn-in period\n",
"\n",
"Results of the MCMC simulations depend heavily on certain choices made in its setup. Specifically, \n",
"\n",
"- The range of parameters acts as a hard cutoff since any parameter values outside these are considered to zero prior probability. Thus, these should be chosen carefully (taking into account the units).\n",
"- In the current implementation, a Gaussian distribution with diagonal covariance is used for the proposal density function. Thus, the standard deviation of each parameter needs to set. If these standard deviations are too large, the MCMC samples will \"bounce\" around too much. If these are too small, the MCMC samples will only hover around the starting point and not fully explore the whole parameter landscape. Thus, this choice needs to balance \"exploration\" (of other areas) and \"exploitation\" (sampling the current state proporationately). The default choice is 5% of the parameter ranges, however this may need to be changed depending on the variance in the likelihood.\n",
"- An initial part of MCMC must be discarded, termed as the \"burn-in\" period. This is usually a few thousands of samples. However, it should be checked that the distribution of remaining samples is insensitive to this choice.\n",
"\n",
"This is only intended to be an overview of these important criteria and how these are set in `pyMechT`. For more details on MCMC, please refer to more dedicated sources, such as [this book](https://www.inference.org.uk/mackay/itprnn/book.html)."
]
}
],
"metadata": {
Expand Down
2 changes: 2 additions & 0 deletions pymecht/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

.. code-block:: sh

$ conda create -n pymecht python=3.9 ipykernel
$ conda activate pymecht
$ pip install pymecht

.. raw:: html
Expand Down
Loading