mirror of
https://github.com/ImperialCollegeLondon/ReCoDE_MCMCFF.git
synced 2025-06-26 08:51:16 +02:00
Move all the notebooks into the docs/ folder
This commit is contained in:
parent
e6f62333cd
commit
b8392ed703
624
code/docs/learning/01 Introduction.ipynb
Normal file
624
code/docs/learning/01 Introduction.ipynb
Normal file
File diff suppressed because one or more lines are too long
@ -9,29 +9,12 @@
|
|||||||
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>"
|
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 1,
|
|
||||||
"id": "6e51fe6c-a8b8-48ed-9e7f-70e18945e597",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"import numpy as np\n",
|
|
||||||
"import matplotlib.pyplot as plt\n",
|
|
||||||
"\n",
|
|
||||||
"# This loads some custom styles for matplotlib\n",
|
|
||||||
"import json, matplotlib\n",
|
|
||||||
"\n",
|
|
||||||
"with open(\"assets/matplotlibrc.json\") as f:\n",
|
|
||||||
" matplotlib.rcParams.update(json.load(f))"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "5e745b48-9cde-49d1-b91b-b04282f6d30d",
|
"id": "5e745b48-9cde-49d1-b91b-b04282f6d30d",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"# Testing\n",
|
"# Packaging It Up\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Before we proceed with writing any more code I want to put what we already have in python file and make it into an installable module. This will be useful both for importing code into these notebooks and for testing later."
|
"Before we proceed with writing any more code I want to put what we already have in python file and make it into an installable module. This will be useful both for importing code into these notebooks and for testing later."
|
||||||
]
|
]
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
|||||||
"<h1 align=\"center\">Markov Chain Monte Carlo for fun and profit</h1>\n",
|
"<h1 align=\"center\">Markov Chain Monte Carlo for fun and profit</h1>\n",
|
||||||
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>\n",
|
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Chapter 3: Testing"
|
"# Testing"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
@ -38,7 +38,7 @@
|
|||||||
"id": "486f066c-f027-44e8-8937-8636a52f32fb",
|
"id": "486f066c-f027-44e8-8937-8636a52f32fb",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"## Functionality\n",
|
"# Adding Functionality\n",
|
||||||
"\n",
|
"\n",
|
||||||
"The main thing we want to be able to do is to take measurements, the code as I have writting it doesn't really allow that because it only returns the final state in the chain. Let's say we have a measurement called `average_color(state)` that we want to average over the whole chain. We could just stick that inside our definition of `mcmc` but we know that we will likely make other measurements too and we don't want to keep writing new versions of our core functionality!\n",
|
"The main thing we want to be able to do is to take measurements, the code as I have writting it doesn't really allow that because it only returns the final state in the chain. Let's say we have a measurement called `average_color(state)` that we want to average over the whole chain. We could just stick that inside our definition of `mcmc` but we know that we will likely make other measurements too and we don't want to keep writing new versions of our core functionality!\n",
|
||||||
"\n",
|
"\n",
|
File diff suppressed because one or more lines are too long
283
code/docs/learning/07 Producing Research Outputs.ipynb
Normal file
283
code/docs/learning/07 Producing Research Outputs.ipynb
Normal file
File diff suppressed because one or more lines are too long
@ -1,12 +1,21 @@
|
|||||||
{
|
{
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
"id": "96ca09e7",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"<h1 align=\"center\">Markov Chain Monte Carlo for fun and profit</h1>\n",
|
||||||
|
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
"id": "94c1cebd-8bb4-4f19-bdb3-c503cd620d22",
|
"id": "94c1cebd-8bb4-4f19-bdb3-c503cd620d22",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"source": [
|
||||||
"source": []
|
"# Doing Reproducible Science"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
@ -106,6 +106,30 @@
|
|||||||
"]\n",
|
"]\n",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "c771a57d-c802-429a-b051-1bd0364b9317",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Finally we add a `readthedocs.yaml` file to tell readthedocs how to build our documentation. https://docs.readthedocs.io/en/stable/config-file/v2.html#packages"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "3843afa1-5c83-4328-bf8c-5e189dc4ee35",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"And the documentation is now hosted [online!](https://recode-mcmcff.readthedocs.io/en/latest/#)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "b5ca1a87-26e8-4006-99ac-38e51948f3b2",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
BIN
code/docs/learning/assets/energy_diagram.png
Normal file
BIN
code/docs/learning/assets/energy_diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user