From e96a56f17713ada3f1894c31c823f14ff8093b49 Mon Sep 17 00:00:00 2001 From: Lisa Schwetlick Date: Wed, 24 Sep 2025 10:15:00 +0200 Subject: [PATCH] adds step 4 exercise --- ..._break_out_the_next_step_probability.ipynb | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/notebooks/walker/Step_4_break_out_the_next_step_probability/Step_4_break_out_the_next_step_probability.ipynb b/notebooks/walker/Step_4_break_out_the_next_step_probability/Step_4_break_out_the_next_step_probability.ipynb index 3ee36ae..3ceca67 100644 --- a/notebooks/walker/Step_4_break_out_the_next_step_probability/Step_4_break_out_the_next_step_probability.ipynb +++ b/notebooks/walker/Step_4_break_out_the_next_step_probability/Step_4_break_out_the_next_step_probability.ipynb @@ -10,7 +10,7 @@ } }, "source": [ - "# Break out the next step proposal\n", + "# How can we break out the next step proposal?\n", "\n", "- We want a separate module for `next_step_proposals`, living in a separate file\n", " - a Gaussian one (it's the one currently in the Walker code), called `gaussian_next_step_proposal`\n", @@ -102,27 +102,11 @@ "plot_trajectory(trajectory, walker.context_map)" ] }, - { - "cell_type": "markdown", - "metadata": { - "nteract": { - "transient": { - "deleting": false - } - } - }, - "source": [ - "# 2. Implement the changes in the code\n", - "1. In a new module `next_step_proposals`, write two functions for two different next step proposals: a Gaussian one (it's the one currently in the Walker code) and a square one (you can find an example below)\n", - "2. Modify the constructor of Walker to take a `next_step_proposal` function and a `next_step_proposal_arguments` dictionary as an input\n", - "3. See if the dream code you wrote works with your implementation! (Don't forget to restart the kernel)" - ] - }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# What the square next step proposal could look like\n", + "# What the square next step proposal could look like (info)\n", "\n", "This is an example of what the square next step proposal function could look like.\n", "\n", @@ -175,6 +159,22 @@ "plt.colorbar()" ] }, + { + "cell_type": "markdown", + "metadata": { + "nteract": { + "transient": { + "deleting": false + } + } + }, + "source": [ + "# 2. Implement the changes in the code (optional)\n", + "1. In a new module `next_step_proposals`, write two functions for two different next step proposals: a Gaussian one (it's the one currently in the Walker code) and a square one (you can find an example below)\n", + "2. Modify the constructor of Walker to take a `next_step_proposal` function and a `next_step_proposal_arguments` dictionary as an input\n", + "3. See if the dream code you wrote works with your implementation! (Don't forget to restart the kernel)" + ] + }, { "cell_type": "code", "execution_count": 7,