Skip to content

Commit

Permalink
correcting issues (#117)
Browse files Browse the repository at this point in the history
* add a note for video 5

* correcting a comment

* correct mismatch between code and instructions

* Process tutorial notebooks

---------

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
spirosChv and actions-user authored Jul 9, 2023
1 parent edb8754 commit b7f2432
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 47 deletions.
8 changes: 4 additions & 4 deletions tutorials/W0D1_PythonWorkshop1/W0D1_Tutorial1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2009,10 +2009,10 @@
" # Plot sample mean using alpha=0.8 and'C0.' for blue\n",
" plt.plot(t, v_mean, 'C0.', alpha=0.8, markersize=10)\n",
"\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(...)\n",
"\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(...)\n",
"\n",
"\n",
Expand Down Expand Up @@ -2081,10 +2081,10 @@
" # Plot sample mean using alpha=0.8 and'C0.' for blue\n",
" plt.plot(t, v_mean, 'C0.', alpha=0.8, markersize=10)\n",
"\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(t, v_mean + v_std, 'C7.', alpha=0.8)\n",
"\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(t, v_mean - v_std, 'C7.', alpha=0.8)\n",
"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2027,10 +2027,10 @@
" # Plot sample mean using alpha=0.8 and'C0.' for blue\n",
" plt.plot(t, v_mean, 'C0.', alpha=0.8, markersize=10)\n",
"\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(...)\n",
"\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(...)\n",
"\n",
"\n",
Expand Down Expand Up @@ -2101,10 +2101,10 @@
" # Plot sample mean using alpha=0.8 and'C0.' for blue\n",
" plt.plot(t, v_mean, 'C0.', alpha=0.8, markersize=10)\n",
"\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(t, v_mean + v_std, 'C7.', alpha=0.8)\n",
"\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(t, v_mean - v_std, 'C7.', alpha=0.8)\n",
"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
# Plot sample mean using alpha=0.8 and'C0.' for blue
plt.plot(t, v_mean, 'C0.', alpha=0.8, markersize=10)

# Plot mean + standard deviation with alpha=0.8 and argument 'C7'
# Plot mean + standard deviation with alpha=0.8 and argument 'C7.'
plt.plot(t, v_mean + v_std, 'C7.', alpha=0.8)

# Plot mean - standard deviation with alpha=0.8 and argument 'C7'
# Plot mean - standard deviation with alpha=0.8 and argument 'C7.'
plt.plot(t, v_mean - v_std, 'C7.', alpha=0.8)


Expand Down
8 changes: 4 additions & 4 deletions tutorials/W0D1_PythonWorkshop1/student/W0D1_Tutorial1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1801,10 +1801,10 @@
" # Plot sample mean using alpha=0.8 and'C0.' for blue\n",
" plt.plot(t, v_mean, 'C0.', alpha=0.8, markersize=10)\n",
"\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean + standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(...)\n",
"\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7'\n",
" # Plot mean - standard deviation with alpha=0.8 and argument 'C7.'\n",
" plt.plot(...)\n",
"\n",
"\n",
Expand All @@ -1819,11 +1819,11 @@
"execution": {}
},
"source": [
"[*Click for solution*](https://github.com/NeuromatchAcademy/precourse/tree/main/tutorials/W0D1_PythonWorkshop1/solutions/W0D1_Tutorial1_Solution_4441778c.py)\n",
"[*Click for solution*](https://github.com/NeuromatchAcademy/precourse/tree/main/tutorials/W0D1_PythonWorkshop1/solutions/W0D1_Tutorial1_Solution_c05a930d.py)\n",
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=778.0 height=577.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D1_PythonWorkshop1/static/W0D1_Tutorial1_Solution_4441778c_0.png>\n",
"<img alt='Solution hint' align='left' width=778.0 height=577.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D1_PythonWorkshop1/static/W0D1_Tutorial1_Solution_c05a930d_0.png>\n",
"\n"
]
},
Expand Down
14 changes: 6 additions & 8 deletions tutorials/W0D2_PythonWorkshop2/W0D2_Tutorial1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"n = 10000\n",
"v_n = el * np.ones([n, step_end])\n",
"i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))\n",
"nbins = 32\n",
"nbins = 50\n",
"\n",
"# Loop over time steps\n",
"for step, t in enumerate(t_range):\n",
Expand Down Expand Up @@ -471,7 +471,7 @@
"n = 10000\n",
"v_n = el * np.ones([n, step_end])\n",
"i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))\n",
"nbins = 32\n",
"nbins = 50\n",
"\n",
"# Loop over time steps\n",
"for step, t in enumerate(t_range):\n",
Expand All @@ -490,14 +490,12 @@
" plt.xlabel('$V_m$ (V)')\n",
"\n",
" # Plot a histogram at t_max/10 (add labels and parameters histtype='stepfilled' and linewidth=0)\n",
" plt.hist(v_n[:,int(step_end / 10)], nbins,\n",
" histtype='stepfilled', linewidth=0,\n",
" label = 't='+ str(t_max / 10) + 's')\n",
" plt.hist(v_n[:,int(step_end / 10)], nbins, histtype='stepfilled',\n",
" linewidth=0, label=f't={t_max / 10} s')\n",
"\n",
" # Plot a histogram at t_max (add labels and parameters histtype='stepfilled' and linewidth=0)\n",
" plt.hist(v_n[:, -1], nbins,\n",
" histtype='stepfilled', linewidth=0,\n",
" label = 't='+ str(t_max) + 's')\n",
" plt.hist(v_n[:, -1], nbins, histtype='stepfilled',\n",
" linewidth=0, label=f't={t_max} s')\n",
" # Add legend\n",
" plt.legend()\n",
" plt.show()"
Expand Down
14 changes: 6 additions & 8 deletions tutorials/W0D2_PythonWorkshop2/instructor/W0D2_Tutorial1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"n = 10000\n",
"v_n = el * np.ones([n, step_end])\n",
"i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))\n",
"nbins = 32\n",
"nbins = 50\n",
"\n",
"# Loop over time steps\n",
"for step, t in enumerate(t_range):\n",
Expand Down Expand Up @@ -473,7 +473,7 @@
"n = 10000\n",
"v_n = el * np.ones([n, step_end])\n",
"i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))\n",
"nbins = 32\n",
"nbins = 50\n",
"\n",
"# Loop over time steps\n",
"for step, t in enumerate(t_range):\n",
Expand All @@ -492,14 +492,12 @@
" plt.xlabel('$V_m$ (V)')\n",
"\n",
" # Plot a histogram at t_max/10 (add labels and parameters histtype='stepfilled' and linewidth=0)\n",
" plt.hist(v_n[:,int(step_end / 10)], nbins,\n",
" histtype='stepfilled', linewidth=0,\n",
" label = 't='+ str(t_max / 10) + 's')\n",
" plt.hist(v_n[:,int(step_end / 10)], nbins, histtype='stepfilled',\n",
" linewidth=0, label=f't={t_max / 10} s')\n",
"\n",
" # Plot a histogram at t_max (add labels and parameters histtype='stepfilled' and linewidth=0)\n",
" plt.hist(v_n[:, -1], nbins,\n",
" histtype='stepfilled', linewidth=0,\n",
" label = 't='+ str(t_max) + 's')\n",
" plt.hist(v_n[:, -1], nbins, histtype='stepfilled',\n",
" linewidth=0, label=f't={t_max} s')\n",
" # Add legend\n",
" plt.legend()\n",
" plt.show()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
n = 10000
v_n = el * np.ones([n, step_end])
i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))
nbins = 32
nbins = 50

# Loop over time steps
for step, t in enumerate(t_range):
Expand All @@ -27,14 +27,12 @@
plt.xlabel('$V_m$ (V)')

# Plot a histogram at t_max/10 (add labels and parameters histtype='stepfilled' and linewidth=0)
plt.hist(v_n[:,int(step_end / 10)], nbins,
histtype='stepfilled', linewidth=0,
label = 't='+ str(t_max / 10) + 's')
plt.hist(v_n[:,int(step_end / 10)], nbins, histtype='stepfilled',
linewidth=0, label=f't={t_max / 10} s')

# Plot a histogram at t_max (add labels and parameters histtype='stepfilled' and linewidth=0)
plt.hist(v_n[:, -1], nbins,
histtype='stepfilled', linewidth=0,
label = 't='+ str(t_max) + 's')
plt.hist(v_n[:, -1], nbins, histtype='stepfilled',
linewidth=0, label=f't={t_max} s')
# Add legend
plt.legend()
plt.show()
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions tutorials/W0D2_PythonWorkshop2/student/W0D2_Tutorial1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"n = 10000\n",
"v_n = el * np.ones([n, step_end])\n",
"i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))\n",
"nbins = 32\n",
"nbins = 50\n",
"\n",
"# Loop over time steps\n",
"for step, t in enumerate(t_range):\n",
Expand Down Expand Up @@ -459,11 +459,11 @@
"execution": {}
},
"source": [
"[*Click for solution*](https://github.com/NeuromatchAcademy/precourse/tree/main/tutorials/W0D2_PythonWorkshop2/solutions/W0D2_Tutorial1_Solution_04b855a3.py)\n",
"[*Click for solution*](https://github.com/NeuromatchAcademy/precourse/tree/main/tutorials/W0D2_PythonWorkshop2/solutions/W0D2_Tutorial1_Solution_c135b57a.py)\n",
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=778.0 height=577.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_04b855a3_0.png>\n",
"<img alt='Solution hint' align='left' width=777.0 height=577.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_c135b57a_0.png>\n",
"\n"
]
},
Expand Down Expand Up @@ -1077,9 +1077,9 @@
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=577.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_c368c1ef_0.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=578.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_c368c1ef_0.png>\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=877.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_c368c1ef_1.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=878.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_c368c1ef_1.png>\n",
"\n"
]
},
Expand Down Expand Up @@ -1180,7 +1180,7 @@
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=877.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_3973c4c4_0.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=878.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_3973c4c4_0.png>\n",
"\n"
]
},
Expand Down Expand Up @@ -1444,7 +1444,7 @@
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=877.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_130ba4a4_0.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=878.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_130ba4a4_0.png>\n",
"\n"
]
},
Expand Down Expand Up @@ -1827,9 +1827,9 @@
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=378.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_bf9f75ab_0.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=372.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_bf9f75ab_0.png>\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=877.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_bf9f75ab_1.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=878.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_bf9f75ab_1.png>\n",
"\n"
]
},
Expand Down Expand Up @@ -2145,7 +2145,7 @@
"\n",
"*Example output:*\n",
"\n",
"<img alt='Solution hint' align='left' width=777.0 height=878.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_a22fdac7_1.png>\n",
"<img alt='Solution hint' align='left' width=776.0 height=878.0 src=https://raw.githubusercontent.com/NeuromatchAcademy/precourse/main/tutorials/W0D2_PythonWorkshop2/static/W0D2_Tutorial1_Solution_a22fdac7_1.png>\n",
"\n"
]
},
Expand Down
9 changes: 9 additions & 0 deletions tutorials/W0D5_Statistics/W0D5_Tutorial2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1740,6 +1740,15 @@
"content_review(f\"{feedback_prefix}_Bayesian_inference_with_Gaussian_distribution_Video\")"
]
},
{
"cell_type": "markdown",
"metadata": {
"execution": {}
},
"source": [
"**Note:** The Bayes rule in the video (0:14-3:05) contains a typo: the denominator should be $P(x)$ and not $P(x,\\theta)$. So, the formula should be $ P(\\theta | x) = \\frac{P(x|\\theta) P(\\theta)}{P(x)}$."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down
9 changes: 9 additions & 0 deletions tutorials/W0D5_Statistics/instructor/W0D5_Tutorial2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,15 @@
"content_review(f\"{feedback_prefix}_Bayesian_inference_with_Gaussian_distribution_Video\")"
]
},
{
"cell_type": "markdown",
"metadata": {
"execution": {}
},
"source": [
"**Note:** The Bayes rule in the video (0:14-3:05) contains a typo: the denominator should be $P(x)$ and not $P(x,\\theta)$. So, the formula should be $ P(\\theta | x) = \\frac{P(x|\\theta) P(\\theta)}{P(x)}$."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down
9 changes: 9 additions & 0 deletions tutorials/W0D5_Statistics/student/W0D5_Tutorial2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,15 @@
"content_review(f\"{feedback_prefix}_Bayesian_inference_with_Gaussian_distribution_Video\")"
]
},
{
"cell_type": "markdown",
"metadata": {
"execution": {}
},
"source": [
"**Note:** The Bayes rule in the video (0:14-3:05) contains a typo: the denominator should be $P(x)$ and not $P(x,\\theta)$. So, the formula should be $ P(\\theta | x) = \\frac{P(x|\\theta) P(\\theta)}{P(x)}$."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down

0 comments on commit b7f2432

Please sign in to comment.