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

embed slides in each module #126

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions coursebook/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ latex:
# added for plotly: https://jupyterbook.org/interactive/interactive.html?highlight=plotly
sphinx:
config:
html_extra_path: ['slides']
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js


# Information about where the book exists on the web
repository:
Expand Down
139 changes: 109 additions & 30 deletions coursebook/modules/m4/4.1_What_and_Why.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
{
"cell_type": "markdown",
"id": "382bf695",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"(section4.1)=\n",
"# 4.1 The What and Why of Statistical Modelling\n",
Expand Down Expand Up @@ -63,6 +67,9 @@
"execution_count": 27,
"id": "63110536",
"metadata": {
"slideshow": {
"slide_type": "slide"
},
"tags": [
"remove-cell"
]
Expand Down Expand Up @@ -110,7 +117,11 @@
{
"cell_type": "markdown",
"id": "31f7c4e1",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"```{figure} ../../figures/4.1_1.svg\n",
"---\n",
Expand All @@ -124,7 +135,11 @@
{
"cell_type": "markdown",
"id": "d8b8b409",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"\n",
"\n",
Expand Down Expand Up @@ -189,7 +204,11 @@
"cell_type": "code",
"execution_count": 2,
"id": "8d9fb506",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [
{
"name": "stdout",
Expand All @@ -214,7 +233,11 @@
{
"cell_type": "markdown",
"id": "d07f0d51",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"With a big enough sample the amount of people choosing chocolate will always rest at our chosen parameter.\n",
"\n",
Expand All @@ -227,7 +250,11 @@
"cell_type": "code",
"execution_count": 3,
"id": "633570f9",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -269,7 +296,11 @@
{
"cell_type": "markdown",
"id": "94f9c099",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Sampling bias and the Central Limit Theorem\n",
"\n",
Expand All @@ -286,7 +317,11 @@
"cell_type": "code",
"execution_count": 10,
"id": "2ce3e7d2",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -321,7 +356,11 @@
{
"cell_type": "markdown",
"id": "a17db510",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"The intuition behind the Central Limit Theorem is two fold:\n",
"- The more ways a thing can happen, the more likely it is to happen.\n",
Expand All @@ -336,7 +375,11 @@
"cell_type": "code",
"execution_count": 5,
"id": "8fe828d4",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -377,7 +420,11 @@
{
"cell_type": "markdown",
"id": "1c95c752",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Statistical Learning\n",
"\n",
Expand All @@ -399,6 +446,9 @@
"execution_count": 25,
"id": "1bced86c",
"metadata": {
"slideshow": {
"slide_type": "skip"
},
"tags": [
"remove-cell"
]
Expand Down Expand Up @@ -437,7 +487,11 @@
{
"cell_type": "markdown",
"id": "7516a7bf",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "skip"
}
},
"source": [
"```{figure} ../../figures/4.1_2.svg\n",
"---\n",
Expand All @@ -451,15 +505,23 @@
{
"cell_type": "markdown",
"id": "35916325",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "skip"
}
},
"source": [
"In this section we have learned the theoretical building blocks of modelling. In the next section we will peek inside a model and learn how a model represents data."
]
},
{
"cell_type": "markdown",
"id": "f1f6b424",
"metadata": {},
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### References and Further Reading\n",
"\n",
Expand All @@ -479,26 +541,43 @@
]
},
{
"cell_type": "markdown",
"id": "899c9288",
"metadata": {},
"cell_type": "code",
"execution_count": 12,
"id": "28287b79",
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"400\"\n",
" height=\"300\"\n",
" src=\"../../4.1_What_and_Why.slides.html?allow=fullscreen\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x7fa39842df10>"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"<!-- WHAT IS A MODEL\n",
"\n",
"Here refer to the hackmd and point out that we have been referring to generative models (i.e. known parameters, can generate data).\n",
"\n",
"But really the parameters are not known.\n",
"\n",
"We want to learn them from data. \n",
"\n",
"Use the diagrams in the hackmd. \n",
"\n",
"Here point out that we have been working with Generative Models. I.e. known parameters, --> "
"from IPython.display import IFrame\n",
"IFrame(\"../../4.1_What_and_Why.slides.html\", width=400, height=300, allow=\"fullscreen\")"
]
}
],
"metadata": {
"celltoolbar": "Edit Metadata",
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
Expand All @@ -514,7 +593,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down