From 04132ff45bc659c564317d9ebec11291be9a2493 Mon Sep 17 00:00:00 2001 From: Chanchana Sornsoontorn Date: Wed, 12 Sep 2018 10:50:03 +0700 Subject: [PATCH 1/4] Use dt; It was unused before --- 04-One-Dimensional-Kalman-Filters.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb index 35a75c5..0a646d4 100644 --- a/04-One-Dimensional-Kalman-Filters.ipynb +++ b/04-One-Dimensional-Kalman-Filters.ipynb @@ -722,7 +722,7 @@ "x = gaussian(0., 20.**2) # dog's position, N(0, 20**2)\n", "velocity = 1\n", "dt = 1. # time step in seconds\n", - "process_model = gaussian(velocity, process_var) \n", + "process_model = gaussian(velocity*dt, process_var) # displacement to add to x\n", " \n", "# simulate dog and get measurements\n", "dog = DogSimulation(\n", From ff7873461ab64c488d20f2b2dc02941f83417730 Mon Sep 17 00:00:00 2001 From: Chanchana Sornsoontorn Date: Wed, 12 Sep 2018 11:01:07 +0700 Subject: [PATCH 2/4] Use a better example for update function --- 04-One-Dimensional-Kalman-Filters.ipynb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb index 0a646d4..c3c1898 100644 --- a/04-One-Dimensional-Kalman-Filters.ipynb +++ b/04-One-Dimensional-Kalman-Filters.ipynb @@ -454,7 +454,7 @@ { "data": { "text/plain": [ - "𝒩(μ=10.377, 𝜎²=0.037)" + "𝒩(μ=10.800, 𝜎²=0.008)" ] }, "execution_count": 10, @@ -472,7 +472,11 @@ " posterior = gaussian_multiply(likelihood, prior)\n", " return posterior\n", "\n", - "update(pos, move)" + "# test the update function\n", + "predicted_pos = gaussian(10., .2**2)\n", + "measured_pos = gaussian(11., .1**2)\n", + "estimated_pos = update(predicted_pos, measured_pos)\n", + "estimated_pos" ] }, { From 05818fc66b76269969f1aff4dec3ff79accc9cc4 Mon Sep 17 00:00:00 2001 From: Chanchana Sornsoontorn Date: Wed, 12 Sep 2018 11:53:33 +0700 Subject: [PATCH 3/4] Fix typo likelihood -> gaussian in the markdown text --- 04-One-Dimensional-Kalman-Filters.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb index c3c1898..6ab7705 100644 --- a/04-One-Dimensional-Kalman-Filters.ipynb +++ b/04-One-Dimensional-Kalman-Filters.ipynb @@ -938,7 +938,7 @@ "\n", "```python\n", "prior = predict(x, process_model)\n", - "likelihood = likelihood(z, sensor_var)\n", + "likelihood = gaussian(z, sensor_var)\n", "x = update(prior, likelihood)\n", "```\n", "\n", From 353c5c1d4655f0c3c990b3ed0fa0bf10f5857ec8 Mon Sep 17 00:00:00 2001 From: Chanchana Sornsoontorn Date: Thu, 13 Sep 2018 03:03:52 +0700 Subject: [PATCH 4/4] Change error value to be consistent with its description --- 04-One-Dimensional-Kalman-Filters.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb index 6ab7705..4086be2 100644 --- a/04-One-Dimensional-Kalman-Filters.ipynb +++ b/04-One-Dimensional-Kalman-Filters.ipynb @@ -1290,7 +1290,7 @@ } ], "source": [ - "book_plots.plot_errorbars([(160, 8, 'A'), (170, 8, 'B')], xlims=(150, 180))" + "book_plots.plot_errorbars([(160, 3, 'A'), (170, 9, 'B')], xlims=(150, 180))" ] }, {