diff --git a/02-Discrete-Bayes.ipynb b/02-Discrete-Bayes.ipynb
index 474cb6e..e0f5877 100644
--- a/02-Discrete-Bayes.ipynb
+++ b/02-Discrete-Bayes.ipynb
@@ -1,1824 +1,1833 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "[Table of Contents](http://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/table_of_contents.ipynb)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Discrete Bayes Filter"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- "\n"
- ],
- "text/plain": [
- ""
- ]
- },
- "execution_count": 1,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "#format the book\n",
- "%matplotlib inline\n",
- "%load_ext autoreload\n",
- "%autoreload 2 \n",
- "from __future__ import division, print_function\n",
- "import sys\n",
- "sys.path.insert(0,'./code')\n",
- "from book_format import load_style\n",
- "load_style()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The Kalman filter belongs to a family of filters called **Bayesian filters**. Most textbook treatments of the Kalman filter present the Bayesian formula, perhaps shows how it factors into the Kalman filter equations, but mostly keeps the discussion at a very abstract level. \n",
- "\n",
- "That approach requires a fairly sophisticated understanding of several fields of mathematics, and it still leaves much of the work of understanding and forming an intuitive grasp of the situation in the hands of the reader.\n",
- "\n",
- "I will use a different way to develop the topic, to which I owe the work of Dieter Fox and Sebastian Thrun a great debt. It depends on building an intuition on how Bayesian statistics work by tracking an object through a hallway - they use a robot, I use a dog. I like dogs, and they are less predictable than robots which imposes interesting difficulties for filtering. The first published example of this that I can find seems to be Fox 1999 [1], with a fuller example in Fox 2003 [2]. Sebastian Thrun also uses this formulation in his excellent Coursera course Artificial Intelligence for Robotics [3]. In fact, if you like watching videos, I highly recommend pausing reading this book in favor of first few lessons of that course, and then come back to this book for a deeper dive into the topic.\n",
- "\n",
- "Let's now use a simple thought experiment, much like we did with the g-h filter, to see how we might reason about the use of probabilities for filtering and tracking."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Tracking a Dog"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Let's begin with a simple problem. We have a dog friendly workspace, and so people bring their dogs to work. Occasionally the dogs wander out of offices and down the halls. We want to be able to track them. So during a hackathon somebody created a little sonar sensor to attach to the dog's collar. It emits a signal, listens for the echo, and based on how quickly an echo comes back we can tell whether the dog is in front of an open doorway or not. It also senses when the dog walks, and reports in which direction the dog has moved. It connects to our network via wifi and sends an update once a second.\n",
- "\n",
- "I want to track my dog Simon, so I attach the device to his collar and then fire up Python, ready to write code to track him through the building. At first blush this may appear impossible. If I start listening to the sensor of Simon's collar I might read 'door', 'hall', 'hall', and so on. How can I use that information to determine where Simon is?\n",
- "\n",
- "To keep the problem small enough to plot easily we will assume that there are only 10 positions in a single hallway to consider, which we will number 0 to 9, where 1 is to the right of 0, 2 is to the right of 1, and so on. For reasons that will be clear later, we will also assume that the hallway is circular or rectangular. If you move right from position 9, you will be at position 0. \n",
- "\n",
- "When I begin listening to the sensor I have no reason to believe that Simon is at any particular position in the hallway. He is equally likely to be in any position. Their are 10 positions, so the probability that he is in any given position is 1/10. \n",
- "\n",
- "Let's represent our belief of his position at any time in a NumPy array."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "[ 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1]\n"
- ]
- }
- ],
- "source": [
- "import numpy as np\n",
- "belief = np.array([1/10]*10)\n",
- "np.set_printoptions(precision=3, linewidth=50)\n",
- "print(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "In Bayesian statistics this is called our **prior**. It basically means the probability prior to incorporating measurements or other information. More completely, this is called the **prior probability distribution**, but that is a mouthful and so it is normally shorted to *prior*. A **probability distribution** is a collection of all possible probabilities for an event. Probability distributions always to sum to 1 because *something* had to happen; the distribution lists all the different *somethings* and the probability of each.\n",
- "\n",
- "I'm sure you've used probabilities before - as in \"the probability of rain today is 30%\". The last paragraph sounds like more of that. But Bayesian statistics was a revolution in probability because it treats the probability as a *belief* about a single event. Let's take an example. I know if I flip a fair coin a infinitely many times 50% of the flips will be heads and 50% tails. That is standard probability, not Bayesian, and is called **frequentist statistics** to distinguish it from Bayes. Now, let's say I flip the coin one more time. Which way do I believe it landed? Frequentist probablility has nothing to say about that; it will merely state that 50% of coin flips land as heads. Bayes treats this as a belief about a single event - the strength of my belief that *this specific* coin flip is heads is 50%.\n",
- "\n",
- "There are more differences, but for now recognize that Bayesian statistics reasons about our belief about a single event, whereas frequentists reason about collections of events. In this rest of this chapter, and most of the book, when I talk about the probability of something I am referring to the probability that some specific thing is true. When I do that I'm taking the Bayesian approach.\n",
- "\n",
- "Now let's create a map of the hallway in another list. Suppose there are first two doors close together, and then another door quite a bit further down the hallway. We will use 1 to denote a door, and 0 to denote a wall:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "hallway = np.array([1, 1, 0, 0, 0, 0, 0, 0, 1, 0])"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "So I start listening to Simon's transmissions on the network, and the first data I get from the sensor is \"door\". For the moment assume the sensor always returns the correct answer. From this I conclude that he is in front of a door, but which one? I have no idea. I have no reason to believe he is is in front of the first, second, or third door. But what I can do is assign a probability to each door. All doors are equally likely, and there are three of them, so I assign a probability of 1/3 to each door. "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5Rib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bXUpA+OKLL4xf/OIXRnx8vGGz2YzExETjmWeeMc6fP291aZba\nsWOHMWrUKGPw4MFGdHS0sWDBAuPMmTNWl9VrPP4cAAAAMMk1v+caAAAA6CuEawAAAMAkhGsAAADA\nJIRrAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAk/wcdEXum4t06AAAAAABJRU5ErkJg\ngg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "from book_format import figsize, set_figsize\n",
- "import book_plots as bp\n",
- "import matplotlib.pyplot as plt\n",
- "\n",
- "belief = np.array([1./3, 1./3, 0, 0, 0, 0, 0, 0, 1./3, 0])\n",
- "set_figsize(y=2)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We call this a multimodal distribution because we have multiple beliefs about the position of our dog. Of course we are not saying that we think he is simultaneously in three different locations, merely that so far we have narrowed down our knowledge in his position to be one of these three locations. My (Bayesian) belief is that there is a 33.3% chance of being at door 0, 33.3% at door 1, and a 33.3% chance of being at door 8. \n",
- "\n",
- "I hand coded the `belief` array in the code above. How would we implement this in code? Well, hallway represents each door as a 1, and wall as 0, so we will multiply the hallway variable by the percentage, like so;"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "[ 0.333 0.333 0. 0. 0. 0. 0. 0.\n",
- " 0.333 0. ]\n"
- ]
- }
- ],
- "source": [
- "pbelief = hallway * (1/3)\n",
- "print(pbelief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Extracting Information from Multiple Sensor Readings"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Let's put Python aside and think about the problem a bit. Suppose we were to read the following from Simon's sensor:\n",
- "\n",
- " * door\n",
- " * move right\n",
- " * door\n",
- " \n",
- "\n",
- "Can we deduce where Simon is at the end of that sequence? Of course! Given the hallway's layout there is only one place where you can be in front of a door, move once to the right, and be in front of another door, and that is at the left end. Therefore we can confidently state that Simon is in front of the second doorway. If this is not clear, suppose Simon had started at the second or third door. After moving to the right, his sensor would have returned 'wall'. That doesn't match the sensor readings, so we know he didn't start there. We can continue with that logic for all the remaining starting positions. Therefore the only possibility is that he is now in front of the second door. We implement this in Python with:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "belief = np.array([0., 1., 0., 0., 0., 0., 0., 0., 0., 0.])"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Obviously I carefully constructed the hallway layout and sensor readings to give us an exact answer quickly. Real problems will not be so clear cut. But this should trigger your intuition - the first sensor reading only gave us very low probabilities (0.333) for Simon's location, but after a position update and another sensor reading we knew much more about where he is. You might suspect, correctly, that if you had a very long hallway with a large number of doors that after several sensor readings and positions updates we would either be able to know where Simon was, or have the possibilities narrowed down to a small number of possibilities. For example, suppose we had a long sequence of \"door, right, door, right, wall, right, wall, right, door, right, door, right, wall, right, wall, right, wall, right, wall, right, door\". Simon could only have started in a location where his movements had a door sequence of [1,1,0,0,1,1,0,0,0,0,1] in the hallway. There might be only one match for that, or at most a few. Either way we will be far more certain about his position then when we started.\n",
- "\n",
- "We could work through the code to implement this solution, but instead let us consider a real world complication to the problem."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Noisy Sensors"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Perfect sensors are rare. Perhaps the sensor would not detect a door if Simon sat in front of it while scratching himself, or it might report there is a door if he is facing towards the wall instead of down the hallway. So in practice when I get a report 'door' I cannot assign 1/3 as the probability for each door. I have to assign something less than 1/3 to each door, and then assign a small probability to each blank wall position. \n",
- "\n",
- "At this point it doesn't matter exactly what numbers we assign; let us say that the probability of the sensor being right is 3 times more likely to be right than wrong. How would we do this?\n",
- "\n",
- "At first this may seem like an insurmountable problem. If the sensor is noisy it casts doubt on every piece of data. How can we conclude anything if we are always unsure?\n",
- "\n",
- "The answer, as with the problem above, is probabilities. We are already comfortable assigning a probabilistic belief about the location of the dog; now we have to incorporate the additional uncertainty caused by the sensor noise. Lets say we get a reading of 'door'. We already said that the sensor is three times as likely to be correct as incorrect, so we should scale the probability distribution by 3 where there is a door. If we do that the result will no longer be a probability distribution, but we will learn how to correct that in a moment.\n",
- "\n",
- "Let's look at that in Python code. Here I use the variable `z` to denote the measurement as that is the customary choice in the literature (`y` is also commonly used). "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false,
- "scrolled": true
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "sum = 1.6\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGdlJREFUeJzt3X9QVXX+x/EXP1IvhUwuQSAoUC6mEik3Nq6Uzg7dWa01\nd0rSdi3Q1oU1U1l3XIodt0St3GFXTbAtB9laC3dq3CZZBxo1YqFZCW9rpq4uu2YD97a6huaGjnC+\nf7Teb7eL/Mgj5yLPx4wz8Dmfzz3v+x6c++J4/JwgwzAMAQAAALhswVYXAAAAAFwtCNcAAACASQjX\nAAAAgEkI1wAAAIBJCNcAAACASQjXAAAAgEkI1wAAAIBJegzXtbW1mjFjhuLi4hQcHKyKiooeX3T/\n/v2aMmWKwsLCFBcXp5UrV5pSLAAAABDIegzXZ8+e1a233qp169bJZrMpKCio2/mnT5/W3XffrZiY\nGDU2NmrdunVau3atSkpKTCsaAAAACERBfXlCY3h4uDZu3KiHH374knPKyspUWFgoj8ejoUOHSpJW\nrVqlsrIyffLJJ5dfMQAAABCgTL/nuqGhQXfeeac3WEuS0+lUS0uLjh07ZvbpAAAAgI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btmjYsGGaM2eO\n1aVYzjAMBQf7RrDg4OBB/y9hF9lsNkVHR+vUqVOqrq7WfffdZ3VJfXLVX7mWvvxn/rlz5yo9PV0O\nh0ObNm3yeYT7YHP27FkdOXJE0pf/hHns2DG5XC5961vf8j55c7BZuHChXnnlFW3fvl0RERHe+/HD\nw8N17bXXWlydNX7xi1/o3nvvVVxcnM6cOaOtW7fqnXfe0c6dO60uzRIX9/v+qrCwMF1//fV+VyoH\nk2XLlmnGjBmKj4/Xp59+qpUrV+qLL77QI488YnVplli6dKkcDodWr16t7Oxs7du3Txs2bBj0W6wZ\nhqGXXnpJs2fPVlhYmNXlWG7mzJl65plnlJiYqHHjxmnfvn36zW9+M2j/3lxUXV2tjo4OjR07VkeP\nHtXPf/5z3XLLLcrNzbW6tL6xcKeSflVaWmokJCQYQ4cONex2u/Huu+9aXZJldu/ebQQFBRlBQUFG\ncHCw9+vc3FyrS7PM13tx8c9TTz1ldWmWycnJMUaPHm0MHTrUiIqKMu6++26jurra6rICClvxGcbs\n2bON2NhYY8iQIcbIkSONBx54wDh48KDVZVlqx44dRmpqqjFs2DAjOTnZ2LBhg9UlWW7Xrl1GcHCw\nsXfvXqtLCQiff/658bOf/cxISEgwbDabkZSUZDz55JPGuXPnrC7NUtu2bTNuuukmY+jQoUZMTIyx\naNEi4/Tp01aX1Wc8/hwAAAAwyVV/zzUAAADQXwjXAAAAgEkI1wAAAIBJCNcAAACASQjXAAAAgEkI\n1wAAAIBJCNcAAACASQjXAAAAgEn+D/DD8FeOe0XrAAAAAElFTkSuQmCC\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "def update(map_, belief, z, correct_scale):\n",
- " for i, val in enumerate(map_):\n",
- " if val == z:\n",
- " belief[i] *= correct_scale\n",
- "\n",
- "belief = np.array([0.1] * 10)\n",
- "reading = 1 # 1 is 'door'\n",
- "update(hallway, belief, z=reading, correct_scale=3.)\n",
- "print('sum =', sum(belief))\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We can see that this is not a probability distribution because it does not sum to 1.0. But we can see that the code is doing mostly the right thing - the doors are assigned a number (0.3) that is 3 times higher than the walls (0.1). All we need to do is normalize the result so that the probabilities correctly sum to 1.0. Normalization is done by dividing each element by the sum of all elements in the list. \n",
- "\n",
- "Also, it is a bit odd to be talking about \"3 times as likely to be right as wrong\". We are working in probabilities, so let's specify the probability of the sensor being correct, and computing the scale factor from that."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false,
- "scrolled": true
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "sum = 1.0\n",
- "probability of door = 0.1875\n",
- "probability of wall = 0.0625\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbVJREFUeJzt3X9QVXX+x/EXP1IvRUwuQiAkYC6mEik3Nq6UzQ7dWcs1\nd03Sdi3Q1oUtU1l3XIqdNkWt3GFXTdAtB9laC3dq3CZZBxo1YqFZCW9rpi4tu2YD97a6huaGjnC+\nf/TtTreL/Mgj5yLPxwwzl8/5fO553/fo3BeXD+cEGYZhCAAAAMAlC7a6AAAAAOBKQbgGAAAATEK4\nBgAAAExCuAYAAABMQrgGAAAATEK4BgAAAExCuAYAAABM0mu4rq2t1cyZMxUXF6fg4GBVVFT0+qQH\nDx7UtGnTFBYWpri4OK1atcqUYgEAAIBA1mu4Pnv2rG6++WatX79eNptNQUFBPc4/ffq07rrrLsXE\nxKixsVHr16/XunXrVFJSYlrRAAAAQCAK6s8dGsPDw7Vp0yY9+OCDF51TVlamwsJCeTweDR8+XJK0\nevVqlZWV6eOPP770igEAAIAAZfqe64aGBt1+++3eYC1JTqdTra2tOnbsmNmnAwAAAAJGqNlP6Ha7\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6mrde++9\nVpfUL1f8J9fSF7/mnz9/vtLT0+VwOLR582afW7gPNWfPnlVzc7OkL36FeezYMblcLn3rW9/y3nlz\nqHnkkUf00ksvaefOnYqIiPDuxw8PD9fVV19tcXXW+OUvf6kZM2YoLi5OZ86c0fbt2/XWW29p9+7d\nVpdmiS+v9/1VYWFhuu666/w+qRxKli9frpkzZyo+Pl6ffPKJVq1apc8//1wPPfSQ1aVZYtmyZXI4\nHFqzZo2ys7N14MABbdy4cchfYs0wDL3wwguaO3euwsLCrC7HcrNmzdLTTz+txMRETZgwQQcOHNBv\nf/vbIfv/5kvV1dXq7OzU+PHj9eGHH+oXv/iFbrrpJuXm5lpdWv9YeKWSAVVaWmokJCQYw4cPN+x2\nu/H2229bXZJl9u7dawQFBRlBQUFGcHCw93Fubq7VpVnm67348uupp56yujTL5OTkGGPGjDGGDx9u\nREVFGXfddZdRXV1tdVkBhUvxGcbcuXON2NhYY9iwYcbo0aON++67zzh8+LDVZVlq165dRmpqqjFi\nxAgjOTnZ2Lhxo9UlWW7Pnj1GcHCwsX//fqtLCQifffaZ8fOf/9xISEgwbDabkZSUZDzxxBPGuXPn\nrC7NUjt27DDGjh1rDB8+3IiJiTEWL15snD592uqy+o3bnwMAAAAmueL3XAMAAAADhXANAAAAmIRw\nDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmOT/AB5FzmwxXQsBAAAAAElF\nTkSuQmCC\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "def normalize(distribution):\n",
- " assert distribution.dtype.kind == 'f'\n",
- " \"\"\" Normalize distribution so it sums to 1.0\"\"\"\n",
- " distribution /= sum(distribution.astype(float)) \n",
- "\n",
- "def update(map_, belief, z, prob_correct):\n",
- " scale = prob_correct / (1. - prob_correct)\n",
- " for i, val in enumerate(map_):\n",
- " if val == z:\n",
- " belief[i] *= scale\n",
- " normalize(belief)\n",
- "\n",
- "belief = np.array([0.1] * 10)\n",
- "update(hallway, belief, 1, prob_correct=.75)\n",
- "\n",
- "print('sum =', sum(belief))\n",
- "print('probability of door =', belief[0])\n",
- "print('probability of wall =', belief[2])\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- " We can see from the output that the sum is now 1.0, and that the probability of a door vs wall is still three times larger. The result also fits our intuition that the probability of a door must be less than 0.333, and that the probability of a wall must be greater than 0.0. Finally, it should fit our intuition that we have not yet been given any information that would allow us to distinguish between any given door or wall position, so all door positions should have the same value, and the same should be true for wall positions.\n",
- " \n",
- "This result is called the **posterior**, which is short for **posterior probability distribution**. All this means is a probability distribution *after* incorporating the measurement information (posterior means 'after' in this context). Most of the Bayesian and Kalman filtering literature uses these terms, so you will have to get used to them. \n",
- "\n",
- "$$ \\mathtt{posterior} = \\frac{\\mathtt{prior}\\times \\mathtt{evidence}}{\\mathtt{normalization}}$$ \n",
- "\n",
- "It is very important to learn and internalize these terms as most of the literature uses them exclusively. You will be unable to read it if these terms aren't crystal clear to you. To review, the *prior* is the probability distribution before including the measurement's information, and the *posterior* is the distribution after the measurement has been incorporated. \n",
- "\n",
- "In this chapter I will keep slipping these terms in so you get used to them. I will usually put then in parenthesis to remind you of the proper term."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Incorporating Movement Data"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Recall how quickly we were able to find an exact solution to our dog's position when we incorporated a series of measurements and movement updates. However, that occurred in a fictional world of perfect sensors. Might we be able to find an exact solution even in the presence of noisy sensors?\n",
- "\n",
- "Unfortunately, the answer is no. Even if the sensor readings perfectly match an extremely complicated hallway map we could not say that we are 100% sure that the dog is in a specific position - there is, after all, the possibility that every sensor reading was wrong! Naturally, in a more typical situation most sensor readings will be correct, and we might be close to 100% sure of our answer, but never 100% sure. This may seem complicated, but lets go ahead and program the math, which as we have seen is quite simple.\n",
- "\n",
- "First let's deal with the simple case - assume the movement sensor is perfect, and it reports that the dog has moved one space to the right. How would we alter our `belief` array?\n",
- "\n",
- "I hope after a moment's thought it is clear that we should shift all the values one space to the right. If we previously thought there was a 50% chance of Simon being at position 3, then after the move to the right we should believe that there is a 50% chance he is at position 4. So let's implement that. Recall that the hallway is circular, so we will use modulo arithmetic to perform the shift correctly."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACrCAYAAACt8bDOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVGX+B/D3HRAYlFBCfpOAIv5CVEaKkcwKcSl/0Fqo\nWxpkGZSmUptLy+aPUCs7lJhom4ZoWbpH19okj7gKhGBKMK6/U1nJDgyFIhKJCjzfP1rm6zT8GOLK\nHeT9Oodz4LnPc5/P/Qx4PnN95rmSEEKAiIiIiIg6TKV0AEREREREdwoW10REREREMmFxTUREREQk\nExbXREREREQyYXFNRERERCQTFtdERERERDJhcU1E3VJWVhbCwsLg5OQElUqFBx98UOmQurwLFy5A\npVIhNjbWqD0mJgYqlQrff//9bZk3OzsbKpUKS5cuvS3nJyJqDxbXRGQxVCqVyZednR18fX0RExOD\n06dPyzLPhQsXMHnyZJw8eRIzZ87EkiVLTApC+v0kSTL5+bdt7dFUPLf1GnVkDiIiuVgrHQAR0a0k\nScLixYsNP1dXV+Obb77B5s2bsWPHDuTl5SEoKKhDc+zbtw/Xr1/H0qVL8eqrr3Y0ZGrDypUrkZiY\nCA8Pjw6dp6Xi+d5778Xp06fh7OzcofMTEcmBxTURWZzXX3/dpO2ll17C+++/j/feew/p6ekdOn9Z\nWRkAwNXVtUPnIfO4ubnBzc2tw+dp6YHCarUaAwcO7PD5iYjkwGUhRNQljB8/HgBQWVnZ7PEdO3Yg\nPDwcTk5OsLOzw8CBA5GYmIiamhpDn6blBUuWLAEA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IzQ0FHv27IFarb59V0JEREREpLA2\ni2sAiI+PR3x8fLPH0tPTTdoef/xxPP744x2LjIiIiIioi5F9txAiIiIiou6KxTURERERkUxYXBMR\nERERyYTFNRERERGRTFhcExERERHJhMU1EREREZFMWFwTEREREcmExTURERERkUxYXBMRERERyYTF\nNRERERGRTFhcExERERHJhMU1EREREZFMWFwTEREREcnErOI6LS0Nvr6+UKvV0Gg0yMvLa3PMe++9\nh0GDBsHOzg4eHh5ITEzscLBERERERJbMuq0O27Ztw4IFC7Bu3TqEhYVh7dq1iIyMxMmTJ+Ht7d3s\nmISEBOzevRvvvPMOAgMDUV1djfLyctmDJyIiIiKyJG0W1ykpKYiNjcXs2bMBAKmpqdizZw/WrVuH\nFStWmPQ/c+YM3n//fRw7dgwBAQGG9qCgIBnDJiIiIiKyPK0uC7lx4waKiooQERFh1B4REYH8/Pxm\nx3z++efw8/NDZmYm/Pz84Ovri5iYGPz000/yRU1EREREZIEkIYRo6WBZWRm8vLyQm5uLsLAwQ/uy\nZcuwdetWnD592mRMXFwcMjIyMGLECKxatQoA8MorrwAACgoKIEmSoW91dbXh+7Nnz3b8aoiIiIiI\nbjN/f3/D946OjkbH2lwW0l6NjY24fv06tmzZggEDBgAAtmzZgoCAABQWFmL06NFyT0lEREREZBFa\nLa6dnZ1hZWWFiooKo/aKigq4u7s3O8bd3R3W1taGwhoABgwYACsrK3z//fctFtcajaa9sbdLYWFh\np8zTlTAnppgTU8yJKebEFHNiijkxxZyYYk6MdZV83Lr64rdaXXNtY2OD4OBg7N2716g9KysLWq22\n2TFhYWGor69HSUmJoa2kpAQNDQ3o169fe+ImIiIiIupS2tznOiEhAZs2bcLGjRtx6tQpzJ8/H3q9\nHnFxcQCAxMREhIeHG/qHh4dj1KhReOaZZ6DT6VBcXIxnnnkG9913n8W/CyEiIiIi6og211xHR0fj\n0qVLSE5ORnl5OQIDA5GZmWnY41qv1xvdpZYkCV9++SVeeukljB07Fmq1GhEREUhJSbl9V0FERERE\nZAHM+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uKaiIiIiEgmLK6JiIiIiGRiMR9oJCLzlVTWoKy2vlPm\n4k47RERE5mNxTdQFldXWd+IOO0240w4REVFbuCyEiIiIiEgmLK6JiIiIiGTC4pqIiIiISCYsromI\niIiIZMLimoiIiIhIJmYX12lpafD19YVarYZGo0FeXl6LfbOzszFlyhR4eHigZ8+eCAoKQnp6uiwB\nExERERFZKrOK623btmHBggVISkqCTqeDVqtFZGQkLl682Gz/goICBAUFYceOHThx4gTi4+MxZ84c\nfPrpp7IGT0RERERkScza5zolJQWxsbGYPXs2ACA1NRV79uzBunXrsGLFCpP+iYmJRj/HxcXhwIED\n2LFjB2bMmCFD2ERERERElqfNO9c3btxAUVERIiIijNojIiKQn59v9kTV1dVwcnJqf4RERERERF1E\nm3euKysr0dDQAFdXV6N2FxcX6PV6syb58ssvsX///nYV43eCmpoaFBaeVzqMNhUWFiodgsWx9Jw0\nPZL8TsW/na6LOTHFnJhiTkwxJ8YsPR/+/v4tHrvtjz8/ePAgnnzySaxZswYajeZ2T0d3KOHgjMqb\nd+bmNs49GiHVdPajzImIiOh2aLO4dnZ2hpWVFSoqKozaKyoq4O7u3urYvLw8PProo3jjjTfw/PPP\ndyzSLsjBwQGaYfcoHUaLmt4VdoU3PXmlVXjt8J1ZgK4Z64ywAJ92jckrrQJw/bbEYwn4t9P1MCem\nmBNTzIkp5sRYV8lHdXV1i8favBVoY2OD4OBg7N2716g9KysLWq22xXG5ubl45JFHsHTpUrz00kvt\nCJeIiIiIqGsya1lIQkICZs6ciZCQEGi1Wqxfvx56vR5xcXEAft0d5MiRI9i3bx+AX/e5fvTRRzF3\n7lzMmDHDsDbbysoKffv2vU2XQkRERESkLLOK6+joaFy6dAnJyckoLy9HYGAgMjMz4e3tDQDQ6/Uo\nKSkx9M/IyEBdXR1WrVqFVatWGdp9fHyM+hERERER3UnM/kBjfHw84uPjmz3226cvpqen84mMRERE\nRNTt3JnbLxARERERKYDFNRERERGRTFhcExERERHJhMU1EREREZFMWFwTEREREcmExTUR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PP610aIpYuHAhtFotVqxYgejoaBQXF2PNmjXdfos1IQQ2bNiA6dOnw97eXulwFBcV\nFYU333wTvr6+GDJkCIqLi/Huu+9227+bJnv37kVDQwMGDRqEc+fO4c9//jMGDx6M2NhYpUNrHwV3\nKulUaWlpwsfHR9ja2gqNRiO+/vprpUNSzIEDB4QkSUKSJKFSqQzfx8bGKh2aYn6bi6avpUuXKh2a\nYmJiYkS/fv2Era2tcHFxEePHjxd79+5VOiyLwq34hJg+fbrw8PAQNjY2wtPTUzz++OPi1KlTSoel\nqN27d4ugoCBhZ2cnAgICxJo1a5QOSXH79+8XKpVKHDlyROlQLMLPP/8sXn75ZeHj4yPUarXw8/MT\nf/3rX8X169eVDk1R27dvF/379xe2trbC3d1dzJs3T1y9elXpsNqNjz8nIiIiIpLJHb/mmoiIiIio\ns7C4JiIiIiKSCYtrIiIiIiKZsLgmIiIiIpIJi2siIiIiIpmwuCYiIiIikgmLayIiIiIimbC4JiIi\nIiKSyf8BpsgRgaw7NugAAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACrCAYAAACt8bDOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+P/DXGUAZXFAkEBVZ1HDDBYgEN/TaFFnmzSS1\nVNAySQ1F+xpG1w33e3FLzO0ClQveFm9XyQsliCSWhKgpmoqpXRhKUnADlPn8/vDHPBpn2PTAYeT1\nfDx4POBzPuec9/kM1GuOn/kcSQghQEREREREj0yldAFERERERI8LhmsiIiIiIpkwXBMRERERyYTh\nmoiIiIhIJgzXREREREQyYbgmIiIiIpIJwzURNQrr169Hjx49YGNjA5VKhYULFypdktkJCAiASmX4\nv43U1NQ6H09XV1e4ubnV2fGJiOTEcE1EZmvt2rVQqVRQqVT44YcfKu23a9cuhIWFoby8HGFhYViw\nYA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LFuHPnDiZOnKh0aYqYNWsW/P39sXTpUgQFBeHYsWNYv359\no19iTQiBrVu3YsyYMbCxsVG6HMWNHDkSy5cvh5ubG7p3745jx45h9erVjfbvpkJSUhLKy8vRtWtX\nnD9/Hu+++y66deuGkJAQpUurHQVXKqlXMTExwtXVVTRt2lT4+PiIQ4cOKV2SYlJSUoQkSUKSJKFS\nqfTfh4SEKF2aYh4ci4qvhQsXKl2aYoKDg4WLi4to2rSpcHBwEM8884xISkpSuqwGhUvxCTFmzBjR\nrl070aRJE9G+fXvxyiuviJycHKXLUtS+fftE7969hbW1tfDw8BDr169XuiTFHThwQKhUKnH06FGl\nS2kQbt68KWbPni1cXV2FWq0W7u7u4v333xelpaVKl6ao3bt3i06dOommTZsKJycnMWPGDFFcXKx0\nWbXGx58TEREREcnksZ9zTURERERUXxiuiYiIiIhkwnBNRERERCQThmsiIiIiIpkwXBMRERERyYTh\nmoiIiIhIJgzXREREREQyYbgmIiIiIpLJ/wM5aPN07qOu5AAAAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "def perfect_predict(belief, move):\n",
- " \"\"\" move the position by 'move' spaces, where positive is \n",
- " to the right, and negative is to the left\n",
- " \"\"\"\n",
- " n = len(belief)\n",
- " result = np.zeros(n)\n",
- " for i in range(n):\n",
- " result[i] = belief[(i-move) % n]\n",
- " belief[:] = result # copy back to original array\n",
- " \n",
- "belief = np.array([.35, .1, .2, .3, 0, 0, 0, 0, 0, .05])\n",
- "bp.bar_plot(belief, title='Before prediction')\n",
- "plt.show()\n",
- "\n",
- "perfect_predict(belief, 1)\n",
- "bp.bar_plot(belief, title='After prediction')"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We can see that we correctly shifted all values one position to the right, wrapping from the end of the array back to the beginning.\n",
- "\n",
- "You will often see this referred to as the state or system **evolution**, which is short for **time evolution** [7]. Another term is **system propogation**. This term refers to how the state of the system changes over time. For filters, this time is usually discrete. For our dog tracking, the system state is the position of the dog, so the state evolution is the position after a discrete amount of time has passed. I haven't defined 'state' or 'system' yet, but I hope it is clear in context. The **system** is what we are trying to model or filter, and the state is its current configuration or value. Except in simulations we rarely know the actual state, so we say our filters produce the **estimated state** of the system. In practice this often gets called the state, so be careful to understand if the reference is to the state of the filter (which is the estimated state), or the state of the system (which is the actual state).\n",
- "\n",
- "More terminology - this prediction becomes our new **prior**. Time has moved forward and we made a prediction without benefit of knowing the measurements. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Adding Noise to the Prediction"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We want to solve real world problems, and we have already stated that all sensors have noise. Therefore the code above must be wrong since it assumes we have perfect measurements. What if the sensor reported that our dog moved one space, but he actually moved two spaces, or zero? Once again this may initially sound like an insurmountable problem, but let's model it and see what happens. Since this is an example we will create a simple noise model for the sensor - later in the book we will handle more difficult errors.\n",
- "\n",
- "We will say that when the sensor sends a movement update, it is 80% likely to be right, and it is 10% likely to overshoot one position to the right, and 10% likely to undershoot to the left. That is, if we say the movement was 4 (meaning 4 spaces to the right), the dog is 80% likely to have moved 4 spaces to the right, 10% to have moved 3 spaces, and 10% to have moved 5 spaces.\n",
- "\n",
- "This is slightly harder than the math we have done so far, but it is still tractable. Each result in the array now needs to incorporate probabilities for 3 different situations. For example, consider position 9 for the case where the reported movement is 2. It should be clear that after the move we need to incorporate the probability that was at position 7 (9-2). However, there is a small chance that our dog actually moved from either 1 or 3 spaces away due to the sensor noise, so we also need to use positions 6 and 8. How much? Well, we have the probabilities, so we can just multiply and add. It would be 80% of position 7 plus 10% of position 6 and 10% of position 8! Let's try coding that:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhk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jo42xo4da0ycONG46667jCNHjlgdy1J79uwxkpOTjfHjxxuJiYnG1q1brY5kuX37\n9hmBgYHGgQMHrI7iF7744gvjZz/7mREXF2fYbDYjISHBeOSRR4yOjg6ro1lq165dxlVXXWWMGzfO\niIqKMlasWGGcPn3a6lgDxuPPAQAAAJOM+GuuAQAAgKFCuQYAAABMQrkGAAAATEK5BgAAAExCuQYA\nAABMQrkGAAAATEK5BgAAAExCuQYAAABM8r/CGpPpPPs74gAAAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "def predict(belief, move, p_correct, p_under, p_over):\n",
- " n = len(belief)\n",
- " result = np.zeros(n)\n",
- " for i in range(n):\n",
- " result[i] = (\n",
- " belief[(i-move) % n] * p_correct +\n",
- " belief[(i-move-1) % n] * p_over +\n",
- " belief[(i-move+1) % n] * p_under) \n",
- " belief[:] = result\n",
- "\n",
- "belief = np.array([0., 0., 0., 1., 0., 0., 0., 0., 0., 0.])\n",
- "predict(belief, move=2, p_correct=.8, p_under=.1, p_over=.1)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The simple test case that we ran appears to work correctly. We initially believed that the dog was in position 3 with 100% certainty; after the movement update we now give an 80% probability to the dog being in position 5, and a 10% chance to undershooting to position 4, and a 10% chance of overshooting to position 6. Let us look at a case where we have multiple beliefs:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false,
- "scrolled": true
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGiNJREFUeJzt3X9QlWX+//EXP1IPRkwuQSAoUC6mEiknNo5Uzg6dWao1\nd0rSdi3Q1mDLVNYdl6JpS9TMHTY1oLYcZGst3Klxm2QdaNSIhW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CMx\nMdHYtGmT1SVZbteuXUZgYKDR2NhodSl+4auvvjJ++ctfGnFxcYbNZjMSEhKMxx9/3Dh9+rTVpVlq\n27ZtxjXXXGOMHj3aiIqKMpYsWWKcPHnS6rIGjcefAwAAACa55O+5BgAAAIYK4RoAAAAwCeEaAAAA\nMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwyf8B0J+h4dvC6WcAAAAASUVORK5C\nYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "belief = np.array([0, 0, .4, .6, 0, 0, 0, 0, 0, 0])\n",
- "predict(belief, move=2, p_correct=.8, p_under=.1, p_over=.1)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here the results are more complicated, but you should still be able to work it out in your head. The 0.04 is due to the possibility that the 0.4 belief undershot by 1. The 0.38 is due to the following: the 80% chance that we moved 2 positions $(.4 * .8)$ and the 10% chance that we undershot $(.6*.1)$. Overshooting plays no role here because if we overshot both .4 and .6 would be past this position. **I strongly suggest working some examples until all of this is very clear, as so much of what follows depends on understanding this step.**\n",
- "\n",
- "If you look at the probabilities after performing the update you probably feel dismay. In the example above we started with probabilities of .4 and .6 in two fields; after performing the update the probabilities are not only lowered, but they are strewn out across the map."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGiNJREFUeJzt3X9QlWX+//EXP1IPRkwuQSAoUC6mEiknNo5Uzg6dWao1\nd0rSdi3Q1mDLVNYdl6JpS9TMHTY1oLYcZGst3Klxm2QdaNSIhWYhpDVT12LXbOCcVteQ3NAR7s8f\nfT3fTgf5sd5yH+T5mGEGrvu6zv0+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jMSEhKMxx9/3Dh9+rTVpVlq\n27ZtxjXXXGOMHj3aiIqKMpYsWWKcPHnS6rIGjcefAwAAACa55O+5BgAAAIYK4RoAAAAwCeEaAAAA\nMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwyf8B0J+h4dvC6WcAAAAASUVORK5C\nYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "This is not a coincidence, or the result of a carefully chosen example - it is always true of the evolution (predict step). This is inevitable; if our sensor is noisy we will lose a bit of information on every prediction. Suppose we were to perform the prediction an infinite number of times - what would the result be? If we lose information on every step, we must eventually end up with no information at all, and our probabilities will be equally distributed across the `belief` array. Let's try this with 500 iterations."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGYRJREFUeJzt3X1wVOX5xvErL7xsNGagSExIJInSIBAjZEnJEsXphJ2i\nFmmBALZoApYmVQRSOjSajhUCqHTSApJolQkpFg0dHepIyiQMLzFNnBLDWkSgsWkRJ9m1UAxIDQzJ\n+f3hzx3WDXmRA2dDvp8ZZjbPeZ49995DhiuHJ+cEGYZhCAAAAMAVC7a6AAAAAOB6QbgGAAAATEK4\nBgAAAExCuAYAAABMQrgGAAAATEK4BgAAAExCuAYAAABM0m24rq6u1vTp0xUTE6Pg4GCVlZV1+6aH\nDh3SlClTFBYWppiYGK1atcqUYgEAAIBA1m24PnfunO68806tX79eNptNQUFBXc4/c+aMpk6dqqio\nKNXX12v9+vVat26dioqKTCsaAAAACERBvXlCY3h4uDZt2qSHH374snNKSkqUn58vj8ejQYMGSZJW\nr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cN688039dxzzykvL+/qfQoAAAAgAHR55VqSMjMzderUKRUWFqqlpUVJ\nSUmqqKhQbGysJMntdqupqck7/6abblJVVZUee+wx2e12DR06VMuXL9eyZcuu3qcAAAAAAkCXdwsB\nAAAA0HOm3y0kUPX2Ee7Xs+rqak2fPl0xMTEKDg5WWVmZ1SVZbu3atZo4caIiIiI0fPhwTZ8+XYcP\nH7a6LEtt2rRJycnJioiIUEREhBwOhyoqKqwuK2CsXbtWwcHBWrx4sdWlWOrXv/61goODff5ER0db\nXZalWlpa9Mgjj2j48OGy2WwaO3asqqurrS7LMnFxcX5/R4KDg/XAAw9YXZplLl68qCeffFIJCQmy\n2WxKSEjQr371K7W3t1tdmqXOnj2rpUuXKi4uTmFhYZo8ebLq6+utLqvX+kW47u0j3K93586d0513\n3qn169fLZrNx+0RJ+/fv1+OPP666ujrt2bNHoaGhysjI0OnTp60uzTKxsbF6/vnndfDgQb333nv6\n7ne/qxkzZuj999+3ujTLvfvuu3r55Zd155138v0jafTo0XK73d4/hw4dsroky3z22WeaPHmygoKC\nVFFRoaNHj+qFF17Q8OHDrS7NMu+9957P34+GhgYFBQVpzpw5VpdmmTVr1uill17Sxo0bdezYMa1f\nv17FxcVau3at1aVZ6tFHH1VVVZX+8Ic/6IMPPpDT6VRGRoaam5utLq13jH4gNTXVWLRokc/YqFGj\njPz8fIsqChw33nijUVZWZnUZAefzzz83QkJCjLffftvqUgLK0KFDjd///vdWl2Gpzz77zLjtttuM\nffv2Gffee6+xePFiq0uy1NNPP22MGzfO6jICRn5+vpGenm51GQGtsLDQGDJkiNHW1mZ1KZZ54IEH\njKysLJ+xhx9+2Pj+979vUUXW+9///meEhoYab731ls94SkqKUVBQYFFV38x1f+X6mzzCHThz5ow6\nOjo0ZMgQq0sJCO3t7Xr99dfV1tame+65x+pyLLVo0SLNnj1bU6ZMkcGvrEiSmpqaNGLECCUkJGje\nvHn617/+ZXVJltmxY4dSU1M1Z84cRUZGavz48dq0aZPVZQUMwzC0efNm/f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9Qr1/2Va+nL/+afP3++UlNT5XA49OKLL/o8wr2/OXfunBobGyV9+V+Yx48fl8vl\n0re+9S3vkzf7m8cee0yvvvqqduzYoYiICO9+/PDwcN1www0WV2eNX/7yl3rggQcUExOjs2fPatu2\nbdq/f7927dpldWmW+Op+35cKCwvTkCFD/K5U9ifLly/X9OnTFRsbq08//VSrVq3SF198oUceecTq\n0iyxbNkyORwOrVmzRpmZmTp48KA2btzY72+xZhiGXnnlFc2dO1dhYWFWl2O5GTNm6Nlnn1V8fLzG\njBmjgwcP6re//W2//b75SmVlpdrb2zV69Gh99NFH+sUvfqE77rhD2dnZVpfWOxbeqeSaKi4uNuLi\n4oxBgwYZdrvdeOedd6wuyTJ79+41goKCjKCgICM4ONj7Ojs72+rSLPP1Xnz155lnnrG6NMtkZWUZ\nI0eONAYNGmQMHz7cmDp1qlFZWWl1WQGFW/EZxty5c43o6Ghj4MCBxogRI4xZs2YZR44csbosS+3c\nudNITk42Bg8ebCQmJhobN260uiTL7dmzxwgODjYOHDhgdSkB4fPPPzd+/vOfG3FxcYbNZjMSEhKM\np556yjh//rzVpVlq+/btxm233WYMGjTIiIqKMhYvXmycOXPG6rJ6jcefAwAAACa57vdcAwAAANcK\n4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwyf8Bu/jdjfzT\nKkQAAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "belief = np.array([1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n",
- "for i in range(500):\n",
- " predict(belief, move=1, p_correct=.8, p_under=.1, p_over=.1)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\n",
- "After 500 iterations we have lost all information, even though we were 100% sure that we started in position 1. Feel free to play with the numbers to see the effect of differing number of updates. For example, after 100 updates we have a small amount of information left.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "And, if you are viewing this on the web or in IPython Notebook, here is an animation of that output.\n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Generalizing with Convolution\n",
- "\n",
- "In the code above we made the assumption that the movement error is only one position. In any real problem it will almost always be possible for the error to be two, three, or more positions. \n",
- "\n",
- "This is easily solved with **convolution**. Convolution is the mathematical technique we use to modify one function with another function. In our case we are modifying our probability distribution with the error function that represents the probability of a movement error. In fact, the implementation of `predict()` is a convolution, though we did not call it that. Formally, convolution is defined as\n",
- "\n",
- "$$ (f \\ast g) (t) = \\int_0^t \\!f(\\tau) \\, g(t-\\tau) \\, \\mathrm{d}\\tau$$\n",
- "\n",
- "where $f\\ast g$ is the notation for convolving f by g. It does not mean multiply.\n",
- "\n",
- "Integrals are for continuous functions, but we are using discrete functions, so we replace the integral with a summation, and the parenthesis with array brackets.\n",
- "\n",
- "$$ (f \\ast g) [t] = \\sum\\limits_{\\tau=0}^t \\!f[\\tau] \\, g[t-\\tau]$$\n",
- "\n",
- "If you look at that equation and compare it to the `predict()` function you can see that they are doing the same thing. \n",
- "\n",
- "I would love to go on and on about convolution, but we have a filter to implement. Khan Academy [4] has a good mathematical introduction to convolution, and Wikipedia has some excellent animations of convolutions [5]. But the general idea is already clear to you. You slide across an array, multiplying the neighbors of the current cell with the values of a second array. This second array is called the **kernel**. In our example above we used .8 for the probability of moving to the correct location, .1 for undershooting, and .1 for overshooting. We make a kernel of this with the array `[0.1, 0.8, 0.1]`. So all we need to do is write a loop that goes over each element of our array, multiplying by the kernel, and summing the results. To emphasize that the belief is a probability distribution I have named the belief `distribution`."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": [
- "def predict(distribution, offset, kernel):\n",
- " N = len(distribution)\n",
- " kN = len(kernel)\n",
- " width = int((kN - 1) / 2)\n",
- "\n",
- " result = np.zeros(N)\n",
- " for i in range(N):\n",
- " for k in range (kN):\n",
- " index = (i + (width-k) - offset) % N\n",
- " result[i] += distribution[index] * kernel[k]\n",
- " distribution[:] = result[:] # update belief"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We should test that this is correct:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGitJREFUeJzt3X9QlWX+//EXYOqhiMklCAQFysVEIuXExpHK2aEza7Xm\nTknargXaGmyZyrrjUjRtiVqxw6Ym1JaDbK2FOzVuk6wDjRqx0CyEtGbqWuyaDZzT6hqSGzrC/fmj\nr+e7p4P8yBvuAzwfM87AdV/3ud/nPUd5cXvf1x1gGIYhAAAAABct0OoCAAAAgJGCcA0AAACYhHAN\nAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJikz3BdU1OjuXPnKjo6WoGBgSovL+/zRffv\n369bbrlFwcHBio6O1po1a0wpFgAAAPBnfYbr06dP67rrrtOGDRtks9kUEBDQ6/xTp07p1ltvVWRk\npBobG7VhwwYVFRWpuLjYtKIBAAAAfxQwkCc0hoSEaPPmzbrvvvsuOKe0tFT5+flyu90aN26cJGnt\n2rUqLS3V559/fvEVAwAAAH7K9Guu6+vrddNNN3mCtSQ5nU61trbq6NGjZh8OAAAA8BtjzH5Bl8ul\nSZMmeY1FRER4tk2ePNkz3t7ebvbhAQAAgCETGhrq9b3pZ677uiYbAAAAGKlMD9dXXXWVXC6X15jb\n7fZsAwAAAEYq0y8LSUtL0+rVq3XmzBnPddfV1dWaOHGi1yUh3/btU+pma2xslCTZ7fZBPc5wQk98\n0RNf9MQXPfFFT3zRE1/0xBc98TZc+tHbpc39WoqvublZzc3N6u7u1tGjR9Xc3Kxjx45JkvLz85WR\nkeGZ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\nuwHOW758uWbMmKG0tDSrS7HU/v37lZaWpjNnzshms2n79u1KSEiwuizLvPTSS2ppadG2bdsk8URa\nSbrxxhtVXl6uqVOnyu12q7CwUA6HQwcOHNCECROsLm/ItbS0qKSkRHl5eXr00Ue1b98+z3X5Dz30\nkMXVWa+6ulr/+te/9POf/9zqUiz1i1/8Qp9//rmuvfZajRkzRufOnVNBQYFnmePRKCQkRGlpaSos\nLNT06dMVERGh1157Te+//76mTJlidXkDMuLDNTBQeXl5qqurU21t7agPT1OnTtXf//53tbe3609/\n+pMWLFigPXv2yG63W13akDt8+LAee+wx1dbWKigoSNI3Z+FG+9nrH/3oR56vp0+frrS0NMXFxam8\nvHxULsHa3d2t1NRUrV27VpKUnJysI0eOaPPmzYRrffMLampqqpKSkqwuxVIbN25UWVmZXn/9dSUm\nJmrfvn1avny5YmNjtXjxYqvLs8wrr7yixYsXKzo6WkFBQUpJSdHChQv1wQcfWF3agIz4cP1dHuGO\n0WvlypXavn279uzZo9jYWKvLsdwll1yi+Ph4SdKMGTPU0NCgzZs3q6yszOLKhl59fb2OHz+uxMRE\nz1hXV5fee+89vfjiizp9+rQuueQSCyv0D8HBwUpMTNQnn3xidSmWiIqK0rRp07zGpk6dqs8++8yi\nivzHF198obfeekslJSVWl2K5tWvXqqCgQJmZmZKkxMREHT16VOvXrx/V4To+Pl579+7V119/rVOn\nTikiIkL33HOPrr76aqtLG5ARf831/z7C/X9VV1fL4XBYVBX80fLly1VRUaHdu3fr+9//vtXl+KWu\nri51d3dbXYYlfvKTn+ijjz7Shx9+qA8//FDNzc2y2+1auHChmpubCdb/T2dnpw4ePDhqT17MmjVL\nhw4d8hr7xz/+wS/rkrZu3arx48dr4cKFVpdiOcMwFBjoHcECAwNH/f+EnWez2RQREaGTJ0+qqqpK\nd955p9UlDciIP3MtffPf/IsWLVJqaqocDodeeOEFr0e4jzanT5/WkSNHJH3zX5hHjx5Vc3Ozvve9\n73mevDnaPPTQQ3r11Ve1Y8cOhYaGeq7HDwkJ0aWXXmpxddb49a9/rTvuuEPR0dHq6OjQtm3b9O67\n72rXrl1Wl2aJ8+t9/6/g4GBdccUVPmcqR5NVq1Zp7ty5iomJ0RdffKE1a9bo66+/1v333291aZZY\nuXKlHA6H1q1bp8zMTO3bt0+bNm0a9UusGYahl19+WQsWLFBwcLDV5Vhu3rx5evrppxUXF6dp06Zp\n3759+t3vfjdq/96cV1VVpa6uLk2dOlWffPKJfvWrX+naa69Vdna21aUNjIUrlQypkpISIzY21hg3\nbpxht9uN9957z+qSLLNnzx4jICDACAgIMAIDAz1fZ2dnW12aZb7di/N/nnzySatLs0xWVpYxefJk\nY9y4cUZ4eLhx6623GlVVVVaX5VdYis8wFixYYERFRRljx441Jk6caNx9993GwYMHrS7LUjt37jSS\nk5ON8ePHGwkJCcamTZusLslyu3fvNgIDA42GhgarS/ELX331lfHLX/7SiI2NNWw2mxEfH2889thj\nxpkzZ6wuzVLbt283rr76amPcuHFGZGSksWzZMuPUqVNWlzVgPP4cAAAAMMmIv+YaAAAAGCqEawAA\nAMAkhGsAAADAJIRrAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAk/wdmqQF7K+PPgwAA\nAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "belief = np.array([.05] * 10)\n",
- "belief[4] = .55\n",
- "predict(belief, offset=1, kernel=[.1, .8, .1])\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "All of the elements are unchanged except the middle ones, which is correct. The value in position 4 should be $0.1 * 0.05 + 0.8 * 0.05 + 0.1 * 0.55 = 0.1$, which it does. Position 5 should be $0.1 * 0.05 + 0.8 * 0.55 + 0.1 * 0.05 = 0.45$, which it does. Finally, position 6 is computed the same as position 4, and it is also correct.\n",
- "\n",
- "Finally, let's ensure that it shifts the positions correctly for movements greater than one."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGiVJREFUeJzt3X9QlWX+//EXYOqhiMklCAQFysVEIuXExpHK2aEza7Xm\nTknargXaGmyZyrrjUjRtiVqxw6Ym1JaDbK2FOzVuk6wDjRqx0CyEpzVT12LXbOCcVteQ3NAR7s8f\nfT3fPR3kR95yH+T5mGEGrvu6z/0+7zmML27v+7qDDMMwBAAAAOC8BVtdAAAAAHCxIFwDAAAAJiFc\nAwAAACYhXAMAAAAmIVwDAAAAJiFcAwAAACYhXAMAAAAm6Tdc19XVafbs2YqNjVVwcLAqKyv7fdG9\ne/fqlltuUWhoqGJjY7Vq1SpTigUAAAACWb/h+uTJk7ruuuu0bt062Ww2BQUF9Tn/xIkTuvXWWxUd\nHa3m5matW7dOJSUlKi0tNa1oAAAAIBAFDeYJjWFhYdq4caPuu+++c84pLy9XYWGhPB6PxowZI0la\nvXq1ysvL9fnnn59/xQAAAECAMv2a68bGRt10003eYC1JTqdTbW1tOnz4sNmHAwAAAALGKLNf0O12\na8KECT5jUVFR3m0TJ070jnd0dJh9eAAAAGDIhIeH+/xs+pnr/q7JBgAAAC5Wpofrq666Sm6322fM\n4/F4twEAAAAXK9MvC8nIyNDKlSt16tQp73XXtbW1Gj9+vM8lId/27VPqZmtubpYk2e32C3qc4YSe\n+KMn/uiJP3rij574oyf+6Ik/euJruPSjr0ubB7QUn8vlksvlUk9Pjw4fPiyXy6UjR45IkgoLC5WV\nleWdf++99yo0NFQ5OTnat2+f3nzzTT3zzDMqKCgw4a0AAAAAgavfcN3U1KTp06dr+vTp6urq0hNP\nPKHp06friSeekPTNTYqtra3e+Zdffrlqa2vV1tYmu92uJUuWaMWKFVq+fPmFexcAAABAAOj3spCZ\nM2eqp6fnnNsrKir8xqZOnap33333/CoDAAA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RtG/BJrhmHo5Zdf1rx58xQaGmp1OZabM2eOnn76aSUkJGjKlCnas2ePfve7\n343Y35uzampq1N3drcmTJ+uTTz7Rr371K1177bXKzc21urTBsXClkiFVVlZmxMfHG2PGjDHsdrvx\n3nvvWV2SZXbt2mUEBQUZQUFBRnBwsPf73Nxcq0uzzLd7cfbrySeftLo0y+Tk5BgTJ040xowZY0RG\nRhq33nqrUVNTY3VZAYWl+Axj3rx5RkxMjDF69Ghj/Pjxxt13323s37/f6rIstX37diM1NdUYO3as\nkZSUZGzYsMHqkiy3c+dOIzg42GhqarK6lIDw1VdfGb/85S+N+Ph4w2azGYmJicZjjz1mnDp1yurS\nLLV161bj6quvNsaMGWNER0cbS5YsMU6cOGF1WYPG488BAAAAk1z011wDAAAAQ4VwDQAAAJiEcA0A\nAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJjk/wATTwF7QjzFigAAAABJRU5E\nrkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "belief = np.array([.05] * 10)\n",
- "belief[4] = .55\n",
- "predict(belief, offset=3, kernel=[.1, .8, .1])\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The position was correctly shifted by 3 positions, so the code seems to be correct.\n",
- "\n",
- "It will usually be true that a small error is very likely, and a large error is very unlikely. For example, a kernel might look like\n",
- "\n",
- " [.02, .1, .2, .36, .2, .1, .02]\n",
- " \n",
- "But maybe an overshoot is very likely, and and undershoot is impossible. That kernel might be\n",
- "\n",
- " [.0, .0, .5, .3, .2]\n",
- " \n",
- "You probably will never be able to compute exact probabilities for the kernel of a real problem. It is usually enough to be approximately right. What you *must* do is ensure that the terms of the kernel sum to 1. The kernel expresses the probability of any given move, and the sum of any probability distribution must be 1.\n",
- "\n",
- "An easy way to do this is to make each term *proportionally* correct and then normalize it to sum to 1."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "[ 0.083 0.167 0.5 0.167 0.083]\n"
- ]
- }
- ],
- "source": [
- "kernel = np.array([1, 2, 6, 2, 1], dtype=float)\n",
- "normalize(kernel)\n",
- "print(kernel)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Integrating Measurements and Movement Updates"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The problem of losing information during a prediction may make it seem as if our system would quickly devolve into no knowledge. However, recall that our process is not an endless series of predictions, but of *update->predict->update->predict->update->predict->update...* The output of the update step, where we measure the current position, is fed into the prediction. The prediction step, with a degraded certainty, is then fed back into the update step where we measure the position again.\n",
- "\n",
- "Let's think about this intuitively. After the first update->predict round we have degraded the knowledge we gained by the measurement by a small amount. But now we take another measurement. When we try to incorporate that new measurement into our belief, do we become more certain, less certain, or equally certain? Consider a simple case - you are sitting in your office. A co-worker asks another co-worker where you are, and they report \"in his office\". You keep sitting there while they ask and answer \"has he moved\"? \"No\" \"Where is he\" \"In his office\". Eventually you get up and move, and lets say the person didn't see you move. At that time the questions will go \"Has he moved\" \"no\" (but you have!) \"Where is he\" \"In the kitchen\". Wow! At that moment the statement that you haven't moved conflicts strongly with the next measurement that you are in the kitchen. If we were modeling these with probabilities the probability that you are in your office would lower, and the probability that you are in the kitchen would go up a little bit. But now imagine the subsequent conversation: \"has he moved\" \"no\" \"where is he\" \"in the kitchen\". Pretty quickly the belief that you are in your office would fade away, and the belief that you are in the kitchen would increase to near certainty. The belief that you are in the office will never go to zero, nor will the belief that you are in the kitchen ever go to 1.0 because of the chances of error, but in practice your co-workers would be correct to be quite confident in their system.\n",
- "\n",
- "That is what intuition tells us. What does the math tell us?\n",
- "\n",
- "Well, we have already programmed the update step, and we have programmed the predict step. All we need to do is feed the result of one into the other, and we will have programmed our dog tracker!!! Let's see how it performs. We will input measurements as if the dog started at position 0 and moved right at each update. However, as in a real world application, we will start with no knowledge and assign equal probability to all positions. "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "collapsed": false,
- "scrolled": true
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbVJREFUeJzt3X9QVXX+x/EXP1IvRUwuQiAkYC6mEik3Nq6UzQ7dWcs1\nd03Sdi3Q1oUtU1l3XIqdNkWt3GFXTdAtB9laC3dq3CZZBxo1YqFZCW9rpi4tu2YD97a6huaGjnC+\nf/TtTreL/Mgj5yLPxwwzl8/5fO553/fo3BeXD+cEGYZhCAAAAMAlC7a6AAAAAOBKQbgGAAAATEK4\nBgAAAExCuAYAAABMQrgGAAAATEK4BgAAAExCuAYAAABM0mu4rq2t1cyZMxUXF6fg4GBVVFT0+qQH\nDx7UtGnTFBYWpri4OK1atcqUYgEAAIBA1mu4Pnv2rG6++WatX79eNptNQUFBPc4/ffq07rrrLsXE\nxKixsVHr16/XunXrVFJSYlrRAAAAQCAK6s8dGsPDw7Vp0yY9+OCDF51TVlamwsJCeTweDR8+XJK0\nevVqlZWV6eOPP770igEAAIAAZfqe64aGBt1+++3eYC1JTqdTra2tOnbsmNmnAwAAAAJGqNlP6Ha7\ndcMNN/iMRUdHe4+NGTPGO97e3m726QEAAIABExER4fO96Z9c97YnGwAAALhSmR6ur7/+erndbp8x\nj8fjPQYAAABcqUzfFpKRkaEVK1bo3Llz3n3XNTU1Gj16tM+WkK/7+kfqZmtsbJQk2e32y3qewYSe\n+KMn/uiJP3rij574oyf+6Ik/euJrsPSjp63NfboUn8vlksvlUldXl44dOyaXy6Xjx49LkgoLC5WV\nleWd/8ADDygsLEw5OTk6dOiQXnvtNT3zzDMqKCgw4aUAAAAAgavXcL1//35NmTJFU6ZMUUdHh558\n8klNmTJFTz75pKQv/kixpaXFO//a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vV1dXq7OzU+PHj9eGHH+oXv/iFbrrpJuXm5lpdWv9YeKWSAVVaWmokJCQYw4cPN+x2\nu/H2229bXZJl9u7dawQFBRlBQUFGcHCw93Fubq7VpVnm67348uupp56yujTL5OTkGGPGjDGGDx9u\nREVFGXfddZdRXV1tdVkBhUvxGcbcuXON2NhYY9iwYcbo0aON++67zzh8+LDVZVlq165dRmpqqjFi\nxAgjOTnZ2Lhxo9UlWW7Pnj1GcHCwsX//fqtLCQifffaZ8fOf/9xISEgwbDabkZSUZDzxxBPGuXPn\nrC7NUjt27DDGjh1rDB8+3IiJiTEWL15snD592uqy+o3bnwMAAAAmueL3XAMAAAADhXANAAAAmIRw\nDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmOT/AB5FzmwxXQsBAAAAAElF\nTkSuQmCC\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "hallway = np.array([1, 1, 0, 0, 0, 0, 0, 0, 1, 0])\n",
- "belief = np.array([.1] * 10)\n",
- "update(hallway, belief, z=1, prob_correct=.75)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGYNJREFUeJzt3X9UlvX9x/EXYOpNISdnEAgJlMNUIuWOxS1lZ4fuM8uZ\nW0naZoE2BytTmTuOYsepqJU7bGqCzjzIahbu1HGdZB7oqBGDziS8m5k6GpvZgftuOkNzoUe4vn/0\n9T7d3ciPvPC6gefjHM+5+VyfD9f7fh/FFxcXnyvIMAxDAAAAAK5YsNUFAAAAAAMF4RoAAAAwCeEa\nAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADBJt+G6urpaM2b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JSO3t7ero6LC6DEv84Ac/0AcffKD3339f77//vlwul+x2u+bMmSOXy0Ww/n9tbW06cuTIoL14\nMWXKFB09etRn7B//+AffrEvavn27hg8frjlz5lhdiuUMw1BwsG8ECw4OHvQ/CbvEZrMpMjJSp0+f\nVmVlpR544AGrS+qVAX/lWvryx/xz585VamqqHA6HNm/e7PMI98Hm3LlzamxslPTljzCPHz8ul8ul\nb33rW94nbw42TzzxhF5++WXt2rVL4eHh3vvxw8LCdO2111pcnTV++ctfavr06YqJidHZs2e1Y8cO\nvf3229qzZ4/VpVni0n7fXxUaGqrrr7/e70rlYLJ06VLNmDFDsbGx+vTTT7Vq1Sp98cUXeuyxx6wu\nzRJLliyRw+HQmjVrlJmZqYMHD2rjxo2Dfos1wzD04osvavbs2QoNDbW6HMvNnDlTzz77rOLj4zV+\n/HgdPHhQv/3tbwftv5tLKisr1d7ernHjxumjjz7SL37xC916663Kzs62urTesXCnkququLjYiIuL\nM4YNG2bY7XbjnXfesboky+zbt88ICgoygoKCjODgYO/r7Oxsq0uzzNd7cenPihUrrC7NMllZWcaY\nMWOMYcOGGREREca9995rVFZWWl1WQGErPsOYPXu2ER0dbQwdOtQYPXq08dBDDxlHjhyxuixL7d69\n20hOTjaGDx9uJCYmGhs3brS6JMvt3bvXCA4ONg4cOGB1KQHh888/N37+858bcXFxhs1mMxISEoxn\nnnnGOH/+vNWlWWrnzp3GzTffbAwbNsyIiooyFi5caJw5c8bqsnqNx58DAAAAJhnw91wDAAAAVwvh\nGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADDJ/wEaW9oMMTIY\nIwAAAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "kernel = (.1, .8, .1)\n",
- "predict(belief, 1, kernel)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "So after the first update we have assigned a high probability to each door position, and a low probability to each wall position. The predict step shifted these probabilities to the right, smearing them about a bit. Now let's look at what happens at the next sense."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGhpJREFUeJzt3X9QVXX+x/EXYOrFiMklCIQEysVUIuXGxpXK2aE7S7Xm\nTknargXaGmyZyrrjUjRtiVq5w6YG1JaDbK2FOzVuk6wDjRqx0CyEtzVT15Zds4F7W11Dc0NHON8/\n+nqn20V+5IFzkedjxhn4nM+5533fgzOve/jwOUGGYRgCAAAAcMGCrS4AAAAAuFgQrgEAAACTEK4B\nAAAAkxCuAQAAAJMQrgEAAACTEK4BAAAAkxCuAQAAAJP0Ga7r6uo0e/ZsxcbGKjg4WJWVlX2+6N69\ne3XLLbcoNDRUsbGxWrVqlSnFAgAAAIGsz3B96tQpXXfddVq/fr1sNpuCgoJ6nX/ixAndeuutio6O\nVnNzs9avX69169appKTEtKIBAACAQBQ0kCc0hoWFqbS0VPfdd99555SXl6uwsFAej0djxoyRJK1e\nvVrl5eX67LPPLrxiAAAAIECZvua6sbFRN910kzdYS5LT6VRbW5sOHz5s9uUAAACAgDHK7Bd0u926\n6qqrfMaioqK8xyZOnOgd7+joMPvyAAAAwJAJDw/3+d70O9d9rckGAAAALlamh+srr7xSbrfbZ8zj\n8XiPAQAAABcr05eFpKena+XKlTp9+rR33XVtba0mTJjgsyTk2759S91szc3NkiS73T6o1xlO6Ik/\neuKPnvijJ/7oiT964o+e+KMnvoZLP3pb2tyvrfhcLpdcLpe6u7t1+PBhuVwuHTlyRJJUWFiozMxM\n7/x7771XoaGhysnJ0b59+/Tmm2/qmWeeUUFBgQlvBQAAAAhcfYbrpqYmzZgxQzNmzFBnZ6eeeOIJ\nzZgxQ0888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UrNHv2bMXFxenzzz/XqlWr9NVXX+n++++3ujRLLF++XA6HQ2vWrFF2drb27Nmj\njRs3jvgt1gzD0Msvv6x58+YpNDTU6nIsN2fOHD399NNKSEjQlClTtGfPHv3ud78bsf9vzqmpqVFX\nV5cmT56sTz75RL/61a907bXXKjc31+rSBsbCnUqGVFlZmREfH2+MGTPGsNvtxnvvvWd1SZbZtWuX\nERQUZAQFBRnBwcHer3Nzc60uzTLf7sW5f08++aTVpVkmJyfHmDhxojFmzBgjMjLSuPXWW42amhqr\nywoobMVnGPPmzTNiYmKM0aNHGxMmTDDuvvtuY//+/VaXZant27cbKSkpxtixY42kpCRj48aNVpdk\nuZ07dxrBwcFGU1OT1aUEhC+//NL45S9/acTHxxs2m81ITEw0HnvsMeP06dNWl2aprVu3GldffbUx\nZswYIzo62liyZIlx4sQJq8saMB5/DgAAAJjkol9zDQAAAAwVwjUAAABgEsI1AAAAYBLCNQAAAGAS\nwjUAAABgEsI1AAAAYBLCNQAAAGASwjUAAABgkv8DFNj1vPFDz+sAAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "update(hallway, belief, z=1, prob_correct=.75)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Notice the tall bar at position 1. This corresponds with the (correct) case of starting at position 0, sensing a door, shifting 1 to the right, and sensing another door. No other positions make this set of observations as likely. Now lets add an update and then sense the wall."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGgJJREFUeJzt3X9QlWX+//EXP1IPRUwuQSAoYK6mEiknNo5Uzg6dWas1\nd0rSdi3Q1mDLVNZdl6JpS9TKHTY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Jltu9e7cRHBxsNDQ0WF1KQPjyyy+Nn//8\n50ZCQoJhs9mMpKQk4/HHHzfOnj1rdWmW2r59uzF+/Hhj5MiRRkxMjLFkyRLj1KlTVpfVZzz+HAAA\nADDJkF9zDQAAAAwUwjUAAABgEsI1AAAAYBLCNQAAAGASwjUAAABgEsI1AAAAYBLCNQAAAGASwjUA\nAABgkv8DtE/5kVUp0eEAAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "predict(belief, 1, kernel)\n",
- "update(hallway, belief, z=0, prob_correct=.75)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "This is exciting! We have a very prominent bar at position 2 with a value of around 35%. It is over twice the value of any other bar in the plot, and is about 4% larger than our last plot, where the tallest bar was around 31%. Let's see one more sense->update cycle."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGihJREFUeJzt3X9QlWX+//EXYOrBiMklCAQFytVUIuXExpHK2aEzS7nm\nTknargXaGmyZyrrrUjRtipq5w6YG1JaDbK2FOzVuk6wDjRqx0CyEpzVT15Zds4FzWl1Dc0NHuD9/\n9PV8Ox3kx3rLfZDnY8YZuO7r5n6f98DM69xe57qDDMMwBAAAAOCiBVtdAAAAAHC5IFwDAAAAJiFc\nAwAAACYhXAMAAAAmIVwDAAAAJiFcAwAAACYhXAMAAAAm6TVc19bWatasWYqNjVVwcLAqKip6/aH7\n9u3T7bffrtDQUMXGxmrVqlWmFAsAAAAEsl7D9enTp3XjjTdqw4YNstlsCgoK6nH+yZMndccddyg6\nOlpNTU3asGGD1q9fr+LiYtOKBgAAAAJRUH+e0BgWFqaSkh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mas+ePfrqq6908uRJ\nRUVF6b777tN1111ndWn9ctmvuf7mI9y/qaamRg6Hw6KqEIiWLFmiyspK7dq1S9/97netLicgdXZ2\nqqury+oyLPGjH/1IH330kT788EN9+OGHcrlcstvtmjdvnlwuF8H6/+no6NCBAweG7M2L6dOn6+DB\ngz5jf//733mzLmnLli0aOXKk5s2bZ3UpljMMQ8HBvhEsODh4yP9P2Hk2m01RUVE6ceKEqqurdffd\nd1tdUr9c9neupa//m3/+/PlKTU2Vw+HQCy+84PMI96Hm9OnTOnz4sKSv/wvzyJEjcrlc+s53vuN9\n8uZQ88gjj+jVV1/V9u3bFR4e7l2PHxYWplGjRllcnTV+9atfaebMmYqNjdWpU6e0detWvfvuu9q5\nc6fVpVni/H7f3xQaGqqrr77a707lULJ8+XLNmjVLcXFx+vzzz7Vq1Sp99dVXevDBB60uzRLLli2T\nw+HQmjVrlJWVpb1792rTpk1Dfos1wzD08ssva+7cuQoNDbW6HMvNnj1bzzzzjBISEjRp0iTt3btX\nv/3tb4fs38151dXV6uzs1MSJE/XJJ5/oF7/4hW644Qbl5ORYXVr/WLhTyYAqLS014uPjjREjRhh2\nu9147733rC7JMrt37zaCgoKMoKAgIzg42Pt1Tk6O1aVZ5tu9OP/v6aeftro0y2RnZxvjxo0zRowY\nYURGRhp33HGHUV1dbXVZAYWt+Axj7ty5RkxMjDF8+HBjzJgxxr333mscOHDA6rIstWPHDiM5OdkY\nOXKkMWHCBGPTpk1Wl2S5Xbt2GcHBwUZjY6PVpQSEL7/80vj5z39uxMfHGzabzUhMTDSeeOIJ48yZ\nM1aXZqlt27YZ1113nTFixAgjOjraWLx4sXHy5Emry+o3Hn8OAAAAmOSyX3MNAAAADBTCNQAAAGAS\nwjUAAABgEsI1AAAAYBLCNQAAAGASwjUAAABgEsI1AAAAYBLCNQAAAGCS/wP4RfCnKyNYUQAAAABJ\nRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "predict(belief, 1, kernel)\n",
- "update(hallway, belief, z=0, prob_correct=.75)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here things have degraded a bit due to the long string of wall positions in the map. We cannot be as sure where we are when there is an undifferentiated line of wall positions, so naturally our probabilities spread out a bit.\n",
- "\n",
- "I spread the computation across several cells, iteratively calling `predict()` and `update()`. This chart from the **g-h Filter** chapter illustrates the algorithm."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAFoCAYAAAAhN0NQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlcE3f+P/DX5CJcCeESEORSQQW0KOKtWNTWE126tdtu\nq631aO2xtrXXtlp7bOv23G7V1bZadf21q1VEt62KAmI9EBUVFVEQBZT7Jgkhyfz+8MusMQEBCZPj\n/Xw8eDyYTyYz7wkfMu/5zOfzGYZlWRaEEEIIsSsCvgMghBBCSM+jBIAQQgixQ5QAEEIIIXbIrAnA\nvHnzIBB0fBcrV66EQCDAjRs3urS/tLQ0CAQC/PDDD116PyGEEGIv2j07t55QP/vssy5tnGEYMAxj\nUJaUlIT33nuvw+t3db+EEEIIaVuHLs+7ekLdsGEDVCqVQVl7CcBf//pXqFQq9OnTp0v7I4QQQkjH\niMy6cZHpzbeVUAiFQgiFQnOGRAghhBB0sg9AYWEhBAIB3nvvPezduxcxMTFwdHSEn58fli9fDp1O\nZ7D+3X0AJkyYgM2bN4NlWQgEAu5n8+bNAEz3Abh58yZeeeUVDBkyBO7u7nB0dMSgQYOwevVq6PX6\n+zl2QgghxG51qQXgl19+wZo1a7BkyRIsWLAASUlJ+PTTT6FQKPDmm28arHvn1f5f//pXvP/++8jI\nyMDWrVu58lGjRrW5r3PnzmHXrl2YM2cOQkND0dLSgl9//RVv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eXk5\nfve7340lTCIiu9gDQOQACoUCf/vb39DW1oaf/OQnuHHjBmJiYhwdFhHJCHsAiCbZSy+9BEmSsH//\nfuj1ehiNRqxevRpnzpxxdGhEJCPsASAiIpIh9gAQERHJEBMAIiIiGWICQEREJENMAIiIiGSICQAR\nEZEMMQEgIiKSISYAREREMsQEgIiISIaYABAREcnQ/wBVACHr/w9L3AAAAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "import gh_internal\n",
- "gh_internal.create_predict_update_chart()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "This filter is a form of the g-h filter. Here we are using the percentages for the errors to implicitly compute the *g* and *h* parameters. We could express the discrete Bayes algorithm as a g-h filter, but that would obscure the logic of this filter.\n",
- "\n",
- "We can express this in pseudocode.\n",
- "\n",
- "**Initialization**\n",
- "\n",
- " 1. Initialize our belief in the state\n",
- " \n",
- "**Predict**\n",
- "\n",
- " 1. Based on the system behavior, predict state at the next time step\n",
- " 2. Adjust belief to account for the uncertainty in prediction\n",
- " \n",
- "**Update**\n",
- "\n",
- " 1. Get a measurement and associated belief about its accuracy\n",
- " 2. Compute residual between estimated state and measurement\n",
- " 3. Determine whether whether the measurement matches each state\n",
- " 4. Update state belief if it matches the measurement\n",
- "\n",
- "When we cover the Kalman filter we will use this exact same algorithm; only the details of the computation will differ. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Finally, for those viewing this in a Notebook or on the web, here is an animation of that algorithm.\n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## The Effect of Bad Sensor Data"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You may be suspicious of the results above because I always passed correct sensor data into the functions. However, we are claiming that this code implements a *filter* - it should filter out bad sensor measurements. Does it do that?\n",
- "\n",
- "To make this easy to program and visualize I will change the layout of the hallway to mostly alternating doors and hallways, and run the algorithm on 5 correct measurements:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGexJREFUeJzt3X9QlWX+//EXP/xxKGJyCQJBgXIxlUg5sXKkdHbozFqt\nuaOStmuBti5smcq661LstCVq5Q67akJtOcjWWrhT4zbJOtCoEQvNSnhaM3Vt2TUbOKfVNTQ3dIT7\n80dfz7fTQX7kLfcBno8ZZ+C6r/vc7/MevHlxc3HfQYZhGAIAAABw2YKtLgAAAAAYLAjXAAAAgEkI\n1wAAAIBJCNcAAACASQjXAAAAgEkI1wAAAIBJCNcAAACASXoM17W1tZo1a5bi4uIUHBysioqKHl/0\nwIEDmj59usLCwhQXF6fVq1ebUiwAAAAQyHoM12fPntXNN9+sDRs2yGazKSgoqNv5p0+f1h133KGY\nmBg1NjZqw4YNWr9+vUpKSkwrGgAAAAhEQX15QmN4eLg2b96s+++//5JzysrKVFhYKI/HoxEjRkiS\n1qxZo7KyMn3yySeXXzEAAAAQoExfc93Q0KDbbrvNG6wlyel0qqWlRceOHTP7cAAAAEDACDX7Bd1u\nt8aMGeMzFh0d7d02duxY73hbW5vZhwcAAAD6TUREhM/npl+57mlNNgAAADBYmR6ur7/+erndbp8x\nj8fj3QYAAAAMVqYvC8nIyNCqVat07tw577rrmpoajR492mdJyNd9/ZK62RobGyVJdrv9ih5nIKEn\n/uiJP3rij574oyf+6Ik/euKPnvgaKP3obmlzr27F53K55HK51NnZqWPHjsnlcun48eOSpMLCQmVl\nZXnn33fffQoLC1NOTo4OHjyo119/XU8//bQKCgpMeCsAAABA4OoxXO/bt09TpkzRlClT1N7erscf\nf1xTpkzR448/LunLP1Jsbm72zr/mmmtUU1OjlpYW2e12LV26VCtXrtSKFSuu3LsAAAAAAkCPy0Jm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XRRx/p5z//uW666Sbl5uZaXVrfWHinkn5VWlpqJCQkGCNGjDDsdrvx\nzjvvWF2SZfbs2WMEBQUZQUFBRnBwsPfj3Nxcq0uzzNd7cfHfE088YXVplsnJyTHGjh1rjBgxwoiK\nijLuuOMOo7q62uqyAgq34jOM+fPnG7Gxscbw4cON0aNHG3PnzjUOHTpkdVmW2rlzp5GammqMHDnS\nSE5ONjZt2mR1SZbbvXu3ERwcbOzbt8/qUgLC559/bvzsZz8zEhISDJvNZiQlJRmPPfaYce7cOatL\ns9T27duNG264wRgxYoQRExNjLF261Dh9+rTVZfUZjz8HAAAATDLo11wDAAAA/YVwDQAAAJiEcA0A\nAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJjk/wBJZuviwMKeXwAAAABJRU5E\nrkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "hallway = [1, 0, 1, 0, 0, 1, 0, 1, 0, 0]\n",
- "kernel = (.1, .8, .1)\n",
- "belief = np.array([.1] * 10)\n",
- "measurements = [1, 0, 1, 0, 0]\n",
- "\n",
- "for m in measurements:\n",
- " update(hallway, belief, z=m, prob_correct=.75)\n",
- " predict(belief, 1, kernel)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "At this point we have correctly identified the likely cases, we either started at position 0 or 5, because we saw the following sequence of doors and walls 1,0,1,0,0. But now lets inject a bad measurement, and see what happens:\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbBJREFUeJzt3X9QVXX+x/EXYOqliMk1CIQEzMVUIuXGxpXK2aE7a7Xm\nbknargXaGmyZyrrjUjRt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ndmjv3r2Ki4uzuhzLXXLJJUpISJAkTZs2TfX19dq8ebNKS0strmzg1dXV6fjx45oyZYp3rKOjQ++8\n846ef/55nTlzRpdccomFFQaG0NBQTZkyRR999JHVpVgiOjpakydP9hmbNGmSPv74Y4sqChyffvqp\n3njjDRUXF1tdiuXWrFmjgoICZWZmSpKmTJmio0ePat26dcM6XCckJGjfvn364osvdOrUKUVGRuqe\ne+7RhAkTrC6tT4b8muuvf4X711VVVcnhcFhUFQLR0qVLVV5erj179ui73/2u1eUEpI6ODnV2dlpd\nhiV+9KMf6YMPPtD777+v999/Xy6XS3a7XfPnz5fL5SJY/5/29nYdOnRo2N68mDFjhg4fPuwz9ve/\n/51f1iVt27ZNo0eP1vz5860uxXKGYSg42DeCBQcHD/v/CfuKzWZTZGSkTp48qcrKSt15551Wl9Qn\nQ/7OtfTlf/MvWLBAqampcjgc2rJli89XuA83Z86cUVNTk6Qv/wvz6NGjcrlc+s53vuP95s3h5qGH\nHtLLL7+snTt3Kjw83LsePywsTJdeeqnF1VnjV7/6le644w7FxMTo9OnT2r59u95++23t3r3b6tIs\n8dV+318XGhqqK664wu9O5XCyYsUKzZ49W7Gxsfr000+1evVqffHFF7r//vutLs0Sy5cvl8Ph0Nq1\na5WZman9+/dr06ZNw36LNcMw9OKLL2revHkKDQ21uhzLzZkzR0899ZTi4+M1efJk7d+/X7/97W+H\n7b+br1RWVqqjo0OTJk3SRx99pF/+8pe69tprlZ2dbXVpfWPhTiUDqri42IiLizNGjRpl2O124513\n3rG6JMvs3bvXCAoKMoKCgozg4GDv4+zsbKtLs8w3e/HVnyeffNLq0iyTlZVljB8/3hg1apQRERFh\n3HrrrUZlZaXVZQUUtuIzjHnz5hnR0dHGyJEjjXHjxhl33323cejQIavLstSuXbuM5ORkY/To0UZi\nYqKxadMmq0uy3J49e4zg4GCjvr7e6lICwueff2784he/MOLi4gybzWYkJCQYjz32mHH27FmrS7PU\njh07jAkTJhijRo0yoqKijCVLlhinTp2yuqw+4+vPAQAAAJMM+TXXAAAAwEAhXAMAAAAmIVwDAAAA\nJiFcAwAAACYhXAMAAAAmIVwDAAAAJiFcAwAAACYhXAMAAAAm+R/XX+G7EZwefAAAAABJRU5ErkJg\ngg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "update(hallway, belief, z=m, prob_correct=.75)\n",
- "predict(belief, 1, kernel)\n",
- "bp.bar_plot(belief)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "That one bad measurement appears to have significantly eroded our knowledge. However, note that our highest probabilities are still at 0 and 5, which is correct. Now let's continue with a series of correct measurements"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 26,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAAF9CAYAAADP4URIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XtUVPXeP/D3DHe5KelwUY6Amh7TSBxvgEiF48HMPF5Q\nO/bEZJmYJppPRUdFifRk57DyBl4fNE8WHDuPVpKCoSJpBSHeMRIfNWE4QYphC/kJ398fLmY5ggzI\nnr3Beb/WYgXf2d/5fGcY333Ys2dvlRBCgIiIiIiI2kyt9AKIiIiIiB4WbK6JiIiIiCTC5pqIiIiI\nSCJsromIiIiIJMLmmoiIiIhIImyuiYiIiIgkwuaaiIiIiEgibK6pwwgPD4darcbly5cVW8Pt27ex\nevVq6PV6PPHEE7C3t4darcbGjRsVWxMRUUfXHvK9uLgYq1atQkREBP7whz/AwcEBGo0GkZGR+OKL\nLxRbF3U8tkovgKg1VCqVovWrq6uxYMECqFQqeHp6wtvbG1euXFF8XUREHZ3SObpkyRKkp6ejX79+\n+NOf/oRu3bqhpKQE//u//4v9+/dj0aJFWLVqlaJrpI6Be66pQxFCQMmLijo7O+Orr75CaWkpSktL\nodfrFVsLEdHDROl8/9Of/oT8/HycP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2oKioCM8++yyEENKt\nnIiIHhjznYjIMlp0+fPWqK+vx61bt7Bjxw707t0bALBjxw707dsX+fn5GDJkSJPz8vPzW1yjNdta\ngpL1rbW20vVZ2/rqS1G7T58+Eqyk/XjY852vd+urrXR9a62tdH1L53uze667du0KGxsblJeXm4yX\nl5fD29u7yTne3t6wtbU1Bi8A9O7dGzY2Nrh8+XJr1k1ERBbCfCcisoxm91zb29tj8ODByMzMxKRJ\nk4zjWVlZmDJlSpNzQkNDcfv2bZSUlCAgIADAnbcS6+rq0LNnz/vW0mq1Zhfb8JdGS7a1BCXrW2tt\npeuzNn/nbVFVVdXm+7AU5nv7qK10fWutrXR9a62tdH258t3sea4XLlyIbdu2YevWrTh37hzmz58P\ng8GA2bNnAwDi4uIQERFh3D4iIgJBQUF46aWXUFhYiOPHj+Oll17C8OHDFftFEhFRY8x3IiLpmT3m\nOioqCpWVlUhMTERZWRkGDhyIjIwM4zlQDQYDSkpKjNurVCp8+eWXeP311xEWFgYnJyfodDokJSVZ\n7lEQEVGrMd+JiKTXog80xsTEICYmpsnbUlNTG415eXkhPT29bSsjIiKLY74TEUmrRZc/JyIiIiIi\n89hcExERERFJhM01EREREZFE2FwTEREREUmEzTURERERkUTYXBMRERERSaRFzXVycjL8/f3h5OQE\nrVaL3NzcFt15cXExXF1d4erq2qZFEhGRZTDfiYikZba5TktLQ2xsLBYvXozCwkIEBwcjMjISV65c\naXZebW0tpk2bhlGjRkGlUkm2YCIikgbznYhIemab66SkJOj1esycORN9+/bFmjVr4O3tjZSUlGbn\nvfXWW3jiiScwZcoUCCEkWzAREUmD+U5EJL1mm+va2loUFBRAp9OZjOt0Ohw9evS+8/bu3Yu9e/di\n7dq1DF4ionaI+U5EZBnNXv68oqICdXV18PT0NBnXaDQwGAxNziktLcWsWbOwe/dudOrUqcULyc/P\nt8i2lqBkfWutrXR91ra++lLU7tOnjwQrsQzme/uqrXR9a62tdH1rra10fUvnu+RnC3nhhRcQExOD\nIUOGSH3XRESkIOY7E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kheu85vv/2GxMRE\nhIeHo127dhgyZAjy8/M1q+/I9Mh3R812wHHzXe9sB5jveuS71tneahbXdbfpXbx4MQoLC2EymRAX\nF4fz58+rXvvatWvo27cv3n33XXh6esJgMKhes86+ffswd+5cHDp0CDk5OXBxccGoUaNw6VLT7tp3\nN0JDQ/H222/jyJEj+O677/DQQw9h3LhxOHr0qOq1b/XNN9/gww8/RN++fTV973v16gWz2Wz5On78\nuCZ1L1++jCFDhsBgMCAzMxPFxcVYu3Yt/P39Va/93XffWb3mgoICGAwGTJ48WfXaK1euxPvvv481\na9bg9OnTePfdd5GWloZVq1apXrvOs88+i+zsbHz00Uc4ceIEYmNjMWrUKJSWlmo2B0ekV747arYD\njp3vemU7wHzXK981z3a9D/q214ABA2TmzJlWbT169JDk5GRN59G+fXvZvHmzpjVvdfXqVXF2dpad\nO3fqUt/X11c++OADzepdvnxZunXrJl999ZWMGDFC5s2bp0nd119/Xe677z5Nat0uOTlZYmJidKl9\nuxUrVkinTp2kqqpK9VpjxoyR6dOnW7X9+c9/lscee0z12iIiv//+u7i4uMh//vMfq/Z+/frJ4sWL\nNZmDo2oJ+e7o2S7iGPmuZ7aLMN9vpVW+65HtrWLPdd1temNjY63aG7tNb1t15coV1NbWolOnTprW\nrampwaeffoqqqioMGzZMs7ozZ87ExIkTMXz4cIjGpweUlJQgJCQEkZGRmDp1Ks6ePatJ3R07dmDA\ngAGYPHkyAgIC8MADD2DdunWa1L6ViGDDhg2YNm2a1e2u1RIXF4ecnBycPn0aAHDq1Cns3bsXjz76\nqOq1gZsfW9bU1NR7rR4eHpodguaImO836ZXtgOPlu17ZDjDf9ch3XbJdlSW7wi5cuCAGg0EOHDhg\n1b506VLp2bOnpnPRe+/GxIkTJTo6WmprazWpd+zYMfHy8hIXFxfx9vbWdK/KBx98IEajUW7cEJvy\nbAAABMZJREFUuCEioume6//973/yr3/9S44fPy579uyRESNGSGBgoFRUVKhe293dXTw8PGTRokVS\nWFgoGzdulPbt28vatWtVr32rL774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mZKSUmJZGVlSVRUlAwePNhyXCipQ698d9Rs\nF3HcfNcz20WY73rlu9bZ3moW1yIiaWlpEh4eLu7u7mI0Gusdo6eWvXv3isFgsHxsVfd9fHy86rVv\nr1n3tXTpUtVrT58+XcLCwsTd3V38/f3l4Ycf1i14RbQ9oXHKlCkSHBwsbm5uEhISIhMmTJCioiJN\naouI7Nq1S6KiosTDw0N69uwpa9as0ax2Tk6OODk5aXLs5a2uXr0qCxYskPDwcPH09JTIyEh59dVX\n5fr165rNYdu2bdKtWzdxd3eXoKAgmTdvnly5ckWz+o5Mj3x31GwXcdx81zvbRZjveuS71tnO258T\nERERESmkVRxzTURERETUGnBxTURERESkEC6uiYiIiIgUwsU1EREREZFCuLgmIiIiIlIIF9dERERE\nRArh4pqIiIiISCFcXBMRERERKYSLayIiIiIihfx/3pDuDjpTJXEAAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "with figsize(y=5.5):\n",
- " measurements = [0, 1, 0, 1, 0, 0]\n",
- "\n",
- " for i, m in enumerate(measurements):\n",
- " update(hallway, belief, z=m, prob_correct=.75)\n",
- " predict(belief, 1, kernel)\n",
- " plt.subplot(3, 2, i+1)\n",
- " bp.bar_plot(belief, title='step{}'.format(i+1))"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "As you can see we quickly filtered out the bad sensor reading and converged on the most likely positions for our dog."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Drawbacks and Limitations"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Do not be mislead by the simplicity of the examples I chose. This is a robust and complete implementation of a histogram filter, and you may use the code in real world solutions. If you need a multimodal, discrete filter, this filter works.\n",
- "\n",
- "With that said, while this filter is used in industry, it is not used often because it has several limitations. Getting around those limitations is the motivation behind the chapters in the rest of this book.\n",
- "\n",
- "The first problem is scaling. Our dog tracking problem used only one variable, $pos$, to denote the dog's position. Most interesting problems will want to track several things in a large space. Realistically, at a minimum we would want to track our dogs $(x,y)$ coordinate, and probably his velocity $(\\dot{x},\\dot{y})$ as well. We have not covered the multidimensional case, but instead of a histogram we use a multidimensional grid to store the probabilities at each discrete location. Each `update()` and `predict()` step requires updating all values in the grid, so a simple four variable problem would require $O(n^4)$ running time *per time step*. Realistic filters can have 10 or more variables to track, leading to exorbitant computation requirements.\n",
- "\n",
- "The second problem is that the histogram is discrete, but we live in a continuous world. The histogram requires that you model the output of your filter as a set of discrete points. In our dog in the hallway example, we used 10 positions, which is obviously far too few positions for anything but a toy problem. For example, for a 100 meter hallway you would need 10,000 positions to model the hallway to 1cm accuracy. So each update and predict operation would entail performing calculations for 10,000 different probabilities. It gets exponentially worse as we add dimensions. If our dog was roaming in a $100x100 m^2$ courtyard, we would need 100,000,000 bins ($10,000^2$) to get 1cm accuracy.\n",
- "\n",
- "A third problem is that the histogram is multimodal. This is not always a problem - an entire class of filters, the particle filters, are multimodal and are often used because of this property. But imagine if the GPS in your car reported to you that it is 40% sure that you are on D street, but 30% sure you are on Willow Avenue. I doubt that you would find that useful. Also, GPSs report their error - they might report that you are at $(109.878W, 38.326N)$ with an error of $9m$. There is no clear mathematical way to extract error information from a histogram. Heuristics suggest themselves to be sure, but there is no exact determination. You may or may not care about that while driving, but you surely do care if you are trying to send a rocket to Mars or track and hit an oncoming missile.\n",
- "\n",
- "This difficulty is related to the fact that the filter often does not represent what is physically occurring in the world. Consider this distribution for our dog:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGexJREFUeJzt3X9QlWX+//EXP/xxKGJyCQJBgXIxlUg5sXKkdHbozFqt\nuaOStmuBti5smcq661LstCVq5Q67akJtOcjWW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OatL\ns9T27duNG264wRgxYoQRExNjLF261Dh9+rTVZfUZjz8HAAAATDLo11wDAAAA/YVwDQAAAJiEcA0A\nAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJjk/wBJZuviwMKeXwAAAABJRU5E\nrkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "belief = [0.2245871, 0.06288015, 0.06109133, \n",
- " 0.0581008, 0.09334062, 0.2245871,\n",
- " 0.06288015, 0.06109133, 0.0581008, 0.09334062]\n",
- "bp.bar_plot(belief) "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- " The largest probabilities are in position 0 and position 5. This does not fit our physical intuition at all. A dog cannot be in two places at once (my dog Simon certainly tries - his food bowl and my lap often have equal allure to him). We would have to use heuristics to decide how to interpret this distribution, and there is usually no satisfactory answer. This is not always a weakness - a considerable amount of literature has been written on *Multi-Hypothesis Tracking (MHT)*. We cannot always distill our knowledge to one conclusion, and MHT uses various techniques to maintain multiple story lines at once, using backtracking schemes to go *back in time* to correct hypothesis once more information is known. This will be the subject of later chapters. In other cases we truly have a multimodal situation - we may be optically tracking pedestrians on the street and need to represent all of their positions. \n",
- " \n",
- "In practice it is the exponential increase in computation time that leads to the discrete Bayes filter being the least frequently used of all filters in this book. Many problems are best formulated as discrete or multimodal, but we have other filter choices with better performance. With that said, if I had a small problem that this technique could handle I would choose to use it; it is trivial to implement, debug, and understand, all virtues."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Tracking and Control\n",
- "\n",
- "So far we have been tracking an object which is moving independently. But consider this very similar problem. I am automating a warehouse and want to use robots to collect all of the items for a customer's order. Perhaps the easiest way to do this is to have the robots travel on a train track. I want to be able to send the robot a destination and have it go correctly to that point. But train tracks and robot motors are imperfect. Wheel slippage and imperfect motors means that the robot is unlikely to travel to exactly the position you command. \n",
- "\n",
- "So, we add sensors. We can add some sort of device to help the robot determine it's position. Perhaps we mount magnets on the track every few feet, and use a Hall sensor to count how many magnets are passed. If we have counted 10 magnets then the robot should be at the 10th magnet. Of course it is possible to either miss a magnet or to count it twice, so we have to accommodate some degree of error. In any case, is should be clear that we can use the code in the previous section to track our robot since the magnet counting is very similar to doorway sensing.\n",
- "\n",
- "But we are not done. A key lesson from the g-h filters chapter is to never throw information away. If you have information you should use it to improve your estimate. What information are we leaving out? Well, we know what our destination is, and we know what control inputs we are feeding to the wheels of the robot at each moment in time. For example, let's say that once a second we send a movement command to the robot - move left 1 unit, move right 1 unit, or stand still. This is obviously a simplification because I am not taking acceleration into account, but I am not trying to teach control theory. If I send the command 'move left 1 unit' I expect that in one second from now the robot will be 1 unit to the left of where it is now. But, wheels and motors are imperfect. We will assume that it never makes a mistake and goes right when told to go left, so the errors should be relatively small. Thus the robot might end up 0.9 units away, or maybe 1.2 units away. \n",
- "\n",
- "Now the entire solution is clear. For the dog which was moving independently we assumed that he kept moving in whatever direction he was previously moving. That is a dubious assumption for my dog! Robots are far more predictable. Instead of making a dubious prediction based on assumption of behavior we will feed in the command that we sent to the robot! In other words, when we call `predict()` we will pass in the commanded movement that we gave the robot along with a kernel that describes the likelihood of that movement."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Simulating the Train Behavior\n",
- "\n",
- "To fully implement this filter we need to simulate an imperfect train. When we command it to move it will sometimes make a small mistake, and it's sensor will sometimes return the incorrect value."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "class Train(object):\n",
- "\n",
- " def __init__(self, track_len, kernel=[1.], sensor_accuracy=.9):\n",
- " self.track_len = track_len\n",
- " self.pos = 0\n",
- " self.kernel = kernel\n",
- " self.sensor_accuracy = sensor_accuracy\n",
- "\n",
- " def move(self, distance=1):\n",
- " \"\"\" move in the specified direction\n",
- " with some small chance of error\"\"\"\n",
- "\n",
- " self.pos += distance\n",
- " # insert random movement error according to kernel\n",
- " r = random.random()\n",
- " s = 0\n",
- " offset = -(len(self.kernel) - 1) / 2\n",
- " for k in self.kernel:\n",
- " s += k\n",
- " if r <= s:\n",
- " break\n",
- " offset += 1\n",
- " self.pos = (self.pos + offset) % self.track_len\n",
- " return self.pos\n",
- "\n",
- " def sense(self):\n",
- " pos = self.pos\n",
- " # insert random sensor error\n",
- " r = random.random()\n",
- " if r > self.sensor_accuracy:\n",
- " if random.random() > 0.5:\n",
- " pos += 1\n",
- " else:\n",
- " pos -= 1\n",
- " return pos"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "With that we are ready to write the simulation. We will put it in a function so that we can run it with different assumptions. I will assume that the robot always starts at the beginning of the track. The track is implemented as being 10 units long, but think of it as a track of length, say 10,000, with the magnet pattern repeated every 10 units. 10 makes it easier to plot and inspect."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 29,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def simulate(iterations, kernel, sensor_accuracy, \n",
- " move_distance, do_print=True):\n",
- " track = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n",
- "\n",
- " belief = np.array([0.01] * 10)\n",
- " belief[0] = .9\n",
- " normalize(belief)\n",
- " \n",
- " robot = Train(len(track), kernel, sensor_accuracy)\n",
- " for i in range(iterations):\n",
- " robot.move(distance=move_distance)\n",
- " m = robot.sense()\n",
- " if do_print:\n",
- " print('''time {}: pos {}, sensed {}, '''\n",
- " '''at position {}'''.format(\n",
- " i, robot.pos, m, track[robot.pos]))\n",
- "\n",
- " update(track, belief, m, sensor_accuracy)\n",
- " index = np.argmax(belief)\n",
- " if do_print:\n",
- " print(''' predicted position is {}'''\n",
- " ''' with confidence {:.4}%:'''.format(\n",
- " index, belief[index]*100)) \n",
- " if i < iterations - 1:\n",
- " predict(belief, move_distance, kernel) \n",
- "\n",
- " bp.bar_plot(belief)\n",
- " if do_print:\n",
- " print()\n",
- " print('final position is', robot.pos)\n",
- " iindex = np.argmax(belief)\n",
- " print('''predicted position is {} with'''\n",
- " '''confidence {:.4}%:'''.format(\n",
- " index, belief[index]*100))"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Read the code and make sure you understand it. Now let's do a run with no sensor or movement error. If the code is correct it should be able to locate the robot with no error. The output is a bit tedious to read, but if you are at all unsure of how the update/predict cycle works make sure you read through it carefully to solidify your understanding."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 30,
- "metadata": {
- "collapsed": false,
- "scrolled": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "time 0: pos 4.0, sensed 4.0, at position 4\n",
- " predicted position is 4 with confidence 91.07%:\n",
- "time 1: pos 8.0, sensed 8.0, at position 8\n",
- " predicted position is 8 with confidence 99.99%:\n",
- "time 2: pos 2.0, sensed 2.0, at position 2\n",
- " predicted position is 2 with confidence 100.0%:\n",
- "time 3: pos 6.0, sensed 6.0, at position 6\n",
- " predicted position is 6 with confidence 100.0%:\n",
- "\n",
- "final position is 6.0\n",
- "predicted position is 6 withconfidence 100.0%:\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbFJREFUeJzt3X9QVPe9xvEH8NeSIFerIAoKJBajEqqsjKwmOh2yU/PD\n2EkkmtYENLVSY1Rqx5LQsamoSezQqhGSpg6SpEmwk4zNROpARg2hkKkENjVGrYaWmJHdVGuQ2IAj\nnPtHrtxuFvkRD55deL9mnIHvOWf32c+sMw+Hw9kgwzAMAQAAALhmwVYHAAAAAPoLyjUAAABgEso1\nAAAAYBLKNQAAAGASyjUAAABgEso1AAAAYBLKNQAAAGCSbst1RUWF5s+fr+joaAUHB6u4uLjbBz1y\n5IjmzJmj0NBQRUdHa+PGjaaEBQAAAPxZt+X64sWLuvXWW7Vt2zbZbDYFBQV1uf+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9v5WXl8vhcFiUCv5o9erVKikp0YEDB/Ttb3/b6jh+qa2tTe3t\n7VbHsMT3v/99ffjhh/rggw/0wQcfyOVyyW63a/HixXK5XBTr/9PS0qJjx44N2JMXs2bN0vHjx73W\n/v73v/PDuqTdu3dr2LBhWrx4sdVRLGcYhoKDvStYcHDwgP9N2BU2m02RkZE6f/68ysrKdO+991od\nqVf6/Zlr6atf8y9ZskQpKSlyOBx67rnnvD7CfaC5ePGiTp48KemrX2E2NDTI5XLpW9/6Vscnbw40\nK1eu1Msvv6y9e/cqPDy843r8sLAw3XDDDRans8bPf/5z3X333YqOjlZzc7NeeeUVvfPOO9q/f7/V\n0Sxx5X7f/y00NFQjRozwOVM5kKxbt07z589XTEyMPvvsM23cuFFffvmlHn74YaujWWLt2rVyOBza\nvHmz0tPTVVdXpx07dgz4W6wZhqHf//73WrRokUJDQ62OY7kFCxboqaeeUlxcnCZPnqy6ujr95je/\nGbD/b64oKytTW1ubJk2apFOnTulnP/uZbrnlFmVmZlodrXcsvFPJdVVQUGDExsYaQ4cONex2u/Hu\nu+9aHckyBw8eNIKCgoygoCAjODi44+vMzEyro1nm67O48u/JJ5+0OpplMjIyjAkTJhhDhw41IiIi\njDvuuMMoKyuzOpZf4VZ8hrFo0SJj7NixxpAhQ4xx48YZ999/v3Hs2DGrY1lq3759RlJSkjFs2DAj\nISHB2LFjh9WRLHfgwAEjODjYOHz4sNVR/MIXX3xh/PSnPzViY2MNm81mxMfHG0888YTR2tpqdTRL\n7dmzx7jpppuMoUOHGlFRUcaqVauMCxcuWB2r1/j4cwAAAMAk/f6aawAAAOB6oVwDAAAAJqFcAwAA\nACahXAMAAAAmoVwDAAAAJqFcAwAAACahXAMAAAAmoVwDAAAAJvlfhweLiCWD980AAAAASUVORK5C\nYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "import random\n",
- "\n",
- "random.seed(3)\n",
- "np.set_printoptions(precision=2, suppress=True, linewidth=60)\n",
- "simulate(4, kernel=[1.], sensor_accuracy=.999,\n",
- " move_distance=4, do_print=True)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We can see that the code was able to perfectly track the robot so we should feel reasonably confident that the code is working. Now let's see how it fairs with some errors. "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 31,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "time 0: pos 4.0, sensed 4.0, at position 4\n",
- " predicted position is 0 with confidence 84.11%:\n",
- "time 1: pos 8.0, sensed 8.0, at position 8\n",
- " predicted position is 4 with confidence 43.44%:\n",
- "time 2: pos 2.0, sensed 2.0, at position 2\n",
- " predicted position is 2 with confidence 81.09%:\n",
- "time 3: pos 5.0, sensed 5.0, at position 5\n",
- " predicted position is 5 with confidence 47.83%:\n",
- "\n",
- "final position is 5.0\n",
- "predicted position is 5 withconfidence 47.83%:\n"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGiZJREFUeJzt3X9QlWX+//EXP1IPRUwuQSAoUC6mEiknNo5Uzg6dWas1\nd0rSdi3Q1mDLVNZdl6JpS9TKHTY1obYcZGst3Klxm2QdaNSIhWYhPK2Zuha7ZgPntLqG5IaOcH/+\n6Ov57ukgP9Zb7gM8HzPOwHVf17nf5z3IvLi5uO8gwzAMAQAAALhgwVYXAAAAAAwXhGsAAADAJIRr\nAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAkfYbr2tpazZ49W3FxcQoODlZFRUWfL7pv\n3z7dcsstCgsLU1xcnFatWmVKsQAAAEAg6zNcnzp1Stddd53Wr18vm82moKCgXuefPHlSt956q2Ji\nYtTU1KT169dr3bp1KikpMa1oAAAAIBAFDeQJjeHh4dq0aZPuu+++884pKytTYWGhPB6PRo8e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ldxut9/8c8cAAACA4arXPdejRo1SWlqaqqur\nddddd3nHa2pqNHfu3B7XZGRkaOXKlTp9+rR333VNTY3GjRvnt9/625fRAQAAgKGsz20hBQUF2rJl\nizZv3qwDBw5o6dKlcrvdysvLkyQVFhYqKyvLO//ee+9VWFiYcnJytH//fr355pt65plnVFBQcPHe\nBQAAABAA+nyITHZ2to4fP67i4mK1tbUpJSVFVVVVio+PlyS53W61tLR4519++eWqqanRQw89JLvd\nrrFjx2rFihVavnz5xXsXAAAAQADo9W4hAAAAAPrP9LuFBKrS0lIlJibKZrPJbrerrq7O6pIsU1tb\nq9mzZysuLk7BwcGqqKiwuiTLrV27VjfccIMiIiIUFRWl2bNna//+/VaXZalNmzYpNTVVERERioiI\nkMPhUFVVldVlBYy1a9cqODhYS5YssboUS/36179WcHCwz7/Y2Firy7JUW1ub7r//fkVFRclms2nK\nlCmqra21uizLJCQk+H2NBAcH64477rC6NMucPXtWjz76qJKSkmSz2ZSUlKTHH39cXV1dVpdmqY6O\nDi1btkwJCQkKCwvTjBkz1NTUZHVZAzYiwvVAH+E+3J06dUrXXXed1q9fL5vNxu0TJb377rt6+OGH\n1dDQoF27dik0NFRZWVk6cWLwHpwSaOLj4/Xss89q7969+uCDD/T9739fc+bM0Ycffmh1aZZ7//33\n9dJLL+m6667j/4+kSZMmye12e//t27fP6pIs8+WXX2rGjBkKCgpSVVWVDh48qOeff15RUVFWl2aZ\nDz74wOfro7m5WUFBQbrnnnusLs0ya9as0YsvvqiNGzfq0KFDWr9+vUpLS7V27VqrS7PUAw88oJqa\nGv3+97/XRx99JKfTqaysLLW2tlpd2sAYI0B6erqxePFin7GJEycahYWFFlUUOC677DKjoqLC6jIC\nzldffWWEhIQYb7/9ttWlBJSxY8cav/vd76wuw1JffvmlcfXVVxt79uwxZs6caSxZssTqkiz1xBNP\nGFOnTrW6jIBRWFhoZGZmWl1GQCsuLjauuOIKo7Oz0+pSLHPHHXcYOTk5PmP33Xef8cMf/tCiiqz3\nn//8xw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13agAz7Pdf//Qj3/1ZTUyOHw2FRVQhES5cuVWVlpXbt2qXvfve7VpcTkLq6utTd\n3W11GZb40Y9+pI8++kgffvihPvzwQ7lcLtntds2fP18ul4tg/f90dnbqwIEDI/bixYwZM3Tw4EGf\nsb///e/8sC5py5YtGjNmjObPn291KZYzDEPBwb4RLDg4eMT/Juwcm82m6OhonThxQtXV1brzzjut\nLmlAhv2Va+mbX/MvWLBA6enpcjgceuGFF3we4T7SnDp1SocPH5b0za8wjxw5IpfLpe985zveJ2+O\nNA899JBeffVVbd++XREREd79+OHh4br00kstrs4av/rVr3THHXcoLi5OHR0d2rp1q959913t3LnT\n6tIsce5+3/8tLCxMV1xxhd+VypFkxYoVmj17tuLj4/XFF19o1apV+vrrr3X//fdbXZolli9fLofD\noTVr1ig7O1t79+7Vxo0bR/wt1gzD0Msvv6x58+YpLCzM6nIsN2fOHD399NNKTEzU5MmTtXfvXv32\nt78dsf9vzqmurlZXV5cmTZqkTz75RL/4xS907bXXKjc31+rSBsbCO5UMqtLSUiMhIcEYPXq0Ybfb\njffee8/qkiyze/duIygoyAgKCjKCg4O9H+fm5lpdmmW+3Ytz/5588kmrS7NMTk6OMWHCBGP06NFG\nVFSUceuttxrV1dVWlxVQuBWfYcybN8+IjY01Ro0aZYwbN864++67jQMHDlhdlqV27NhhpKamGmPG\njDGSk5ONjRs3Wl2S5Xbt2mUEBwcbjY2NVpcSEL766ivj5z//uZGQkGDYbDYjKSnJeOyxx4zTp09b\nXZqltm3bZlx99dXG6NGjjZiYGGPJkiXGyZMnrS5rwHj8OQAAAGCSYb/nGgAAABgshGsAAADAJIRr\nAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAkhGsAAADAJP8HUS+0ceWEGmwAAAAASUVO\nRK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "random.seed(3)\n",
- "simulate(4, kernel=[.1, .8, .1], sensor_accuracy=.9,\n",
- " move_distance=4, do_print=True)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here we see that there was a sense error at time 1, but we are still quite confident in our position. \n",
- "\n",
- "Now lets run a very long simulation and see how the filter responds to errors."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 32,
- "metadata": {
- "collapsed": false,
- "scrolled": false
- },
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAADvCAYAAAA5OPi0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlcVPX+P/DXGRYZdcAFWURiSXMJNGE0xQ2X6Fpq3gzL\nLIUor1Qa0qL4RXFBuWnxuK5k6UPNNirv1UpSMHBB7QYhbrmGoSnDFa6BUkjA5/eHP+Y6zsAMcGYG\nnNfz8eBxL5/z+Zz35wC++syZM+dIQggBIiIiIiJqNoW1J0BEREREdK/g4pqIiIiISCZcXBMRERER\nyYSLayIiIiIimXBxTUREREQkEy6uiYiIiIhkwsW1Dfrll1+gUCgQGRlp7anILiIiAgqFApcuXbL2\nVIiILI75TmR9XFzbMEmSdL4PDQ1t8cFVF6779+83uF2SJL3jsraysjKsXLkSU6dORZ8+fWBvbw+F\nQoE9e/aYvI/KykoEBARAoVDA09Oz3n67d+/G448/Dh8fHyiVSvj4+GDs2LHYtWuXHIdCRK0E890y\nLJnvO3fuxOjRo9GhQwcolUr06tULCxYswO+//y7HoZCM7K09AbK8bt264cyZM3BxcdHb1tKCqz71\nzTMpKQlxcXHo2rWrhWdUv4sXL2Lu3LmQJAndunVDly5dUFxc3Kif9bx587T/UaxvXGJiIhYuXIj2\n7dtj4sSJ8Pb2xq+//op//vOf2LNnD+Lj47FkyRJZjomIWibmu2VZKt8XLFiAZcuWoX379njyySfh\n5uaG77//HsuWLUNaWhr27dsHlUolyzFR8/HMtQ2yt7fHAw88AHd3d71tQgi0hod21jdHDw8PPPDA\nA7C3bzmvG319ffHdd9+htLQU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t7i6KiIoP9X331VZ32up+Fj4+PuHz5sra9urpa\nDB8+XEiSJH744QeDczDG1DMbH330kZAkSXz00UfatvrObAghxLlz54RarRYqlUpMmzZNzJs3T0yb\nNk2oVCoRFBQkzp4926T5ElHrwXzX79/a833+/Pn1nrn+888/hbOzs5AkSWzYsKFJcyb58ZprMsmJ\nEyeQmZmJiRMn4umnn9bZplKpsGjRIggh8PHHH+uN9fDwqPd6MD8/P4PtMTExAICMjIxmzhzaswLz\n58+Hh4eHzrYVK1bAyckJW7duRXV1td7YhQsXolu3btrv7ezstLe4ysnJafbc6nPp0iW88sorePLJ\nJzF16lSTxtx///144YUXoFKpsG3bNrz99tvYtm0b2rZti+eff97gWQ8iIub7bS0138ePHw8A2Lhx\nIy5evKizLSkpCTdu3AAAXL9+Xf7JUpPwshAyyaFDhwDcvu3QokWL9LZfu3YNAHD69Gm9bf369YOD\ng4PB/VZUVGDVqlX417/+hXPnzuHmzZs6H2a5cuVKs+eel5cHABg1apTeNjc3NwQGBiInJwfnzp1D\nnz59dLar1Wq9MXVhbK4gE0IgIiICTk5OeO+990we98wzz+DLL7/EM888gwULFsDf3x+//vorVq9e\njdjYWHz99dfIyMiAQsHX1ET0P8z3/2mJ+T5o0CC8/PLLWL9+Pfr164cnn3wSXbp0wb///W8cOnQI\nffv2xfHjx5ntLQgX12SS0tJSAMB3331X77VokiShoqJCr/3uswl1/vzzT4waNQo5OTkIDAzElClT\n0KVLFzg4OEAIgcWLF+PWrVvNnntZWRkkSap3HnXXIZeVleltu/OaxDp1n1Svqalp9twMWbt2Lfbt\n24ft27fD1dXVpDH79u3Dl19+ieDgYHzyySfa9vvvvx+rVq3CpUuXsHPnTnzyySd47rnnzDJvImqd\nmO//0xLzvW7cgAEDsGHDBmzfvh1CCPTv3x9paWn4+uuvcfz4cYN3iCHr4OKaTFJ3z9Tk5GTtW3qm\nqu++nTt37kROTg4iIyP1PtBRVFSExYsXN22yd6mbe1FREZydnfW2FxUV6fSzth9//BEAMGnSJI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cQMxMTHw9fVF27ZtMWTIEOTm5lqsvi2zRr7barYD\ntpvv1s52gPlujXy3dLa3msV13WN64+PjkZ+fj5CQEIwdOxaXL182e+2Kigr07dsXq1atglKpbPLt\nqJpi//79ePXVV3HkyBFkZmbC3t4eY8aMwfXrjbvXd1N4e3tjxYoVOHr0KH788UeMGjUKEydOxLFj\nx8xe+07ff/89PvjgA/Tt29eiP/tevXpBo9Fov06cOGGRur/99huGDBkCSZKQlpaGM2fOYO3atXBz\nM/+ttX788UedY87Ly4MkSXj66afNXnv58uXYsGED1qxZg7Nnz2LVqlVYv349kpKSzF67zosvvoiM\njAx8+OGHOHnyJMLCwjBmzBhcvXrVYnOwRdbKd1vNdsC2891a2Q4w362V7xbPdmtf9G2qgQMHihkz\nZui09ejRQ8TFxVl0Hu3btxdbt261aM073bx5U9jZ2YlvvvnGKvU7deok3n//fYvV++2338T9998v\n9u3bJ0JS205DAAAgAElEQVRDQ8WsWbMsUjchIUEEBARYpNbd4uLixNChQ61S+26JiYmiY8eOorKy\n0uy1xo0bJyIiInTapk2bJsaPH2/22kII8fvvvwt7e3vx1Vdf6bQHBweL+Ph4i8zBVrWEfLf1bBfC\nNvLdmtkuBPP9TpbKd2tke6s4c133mN6wsDCd9oYe03uvKi8vR21tLTp27GjRujU1Nfjss89QWVmJ\n4cOHW6zujBkzEB4ejhEjRkBY+OMBBQUF8PLygr+/P6ZMmYKLFy9apO6OHTswcOBAPP3003B3d0f/\n/v2xbt06i9S+kxACmzZtwnPPPafzuGtzGTt2LDIzM3H27FkAwE8//YSsrCw89thjZq8N3H7bsqam\nRu9YnZycLHYJmi1ivt9mrWwHbC/frZXtAPPdGvlulWw3y5JdZleuXBGSJImDBw/qtC9evFj07NnT\nonOx9tmN8PBwERQUJGpray1S7/jx46Jdu3bC3t5eqFQqi55Vef/994VarRbV1dVCCGHRM9fffvut\n+OKLL8SJEyfE3r17RWhoqPDw8BClpaVmr92mTRvh5OQk5s+fL/Lz88XmzZtF+/btxdq1a81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8NFZLFYLFhbW8s6\nW15eRn19vbQZ3j0/P+Pu7g4AMDAwgN7eXukz6MV36Xe9dzug336X1e0A+/0zLfpdVrf/iDvX/+Ux\nvf8nExMTYnd3VwQCAdHY2KjpLG9vbyKTyaie09/fLy4vL0UkEhGRSESEw2HR0tIiXC6XCIfDwmg0\nqj7DZy8vLyIajQqr1ap6Vnt7u4jFYlln19fXwm63q579bmtrSxQUFAiXyyUtE4BQlOxKUhRF+l17\nIYQoLCwUFRUV4uHhQfj9ftHX1yd9Br3Qc79/p24XQp/9LrPbhWC/f6ZFv0vrdlVWdhX87TG9akql\nUgiFQgiFQigqKsLS0hJCoZCUbLfbjdLSUgQCAdze3n68UqmU6tkzMzM4PT1FMpnExcUFZmdnoSgK\n/H6/6tl/IvNjQ4/Hg5OTEyQSCZydnaGnpwdlZWVS3vNgMAij0YiVlRXc3Nxgb28PZWVl8Hq9qmcD\nQCaTQUNDw5dvb1Db6Ogoampq4PP5kEwmcXBwALPZjOnpaWkzHB0d4fDwEIlEAn6/H83NzWhra/u4\nF0rq0Krf9drtgH77XctuB9jvWvW77G7/Mcs1AHi9XtjtdphMJrS0tHy5o6eW4+NjGAyGj4+t3n8e\nGRlRPfv3zPfX4uKi6tnDw8Ow2WwwmUywWCzo7u7WrHgBuf/QODg4iKqqKuTn56O6uhpOpxPRaFRK\nNgD4fD40NzejoKAAv379wvr6urTsQCAARVGk3L38LJVKwePxwG63o7CwELW1tVhYWEA6nZY2w97e\nHurq6mAymWC1WjE+Po7Hx0dp+XqmRb/rtdsB/fa71t0OsN+16HfZ3c7HnxMRERER5ciPuHNNRERE\nRPQTcLkmIiIiIsoRLtdERERERDnC5ZqIiIiIKEe4XBMRERER5QiXayIiIiKiHOFyTURERESUI1yu\niYiIiIhyhMs1EREREVGO/APfKPqBGZxnvAAAAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "with figsize(y=5):\n",
- " for i in range (4):\n",
- " random.seed(3)\n",
- " plt.subplot(321+i)\n",
- " simulate(148+i, kernel=[.1, .8, .1], \n",
- " sensor_accuracy=.8,\n",
- " move_distance=4, do_print=False)\n",
- " plt.title ('iteration {}'.format(148+i))"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We can see that there was a problem on iteration 149 as the confidence degrades. But within a few iterations the filter is able to correct itself and regain confidence in the estimated position."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Bayes Theorem"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We developed the math in this chapter merely by reasoning about the information we have at each moment. In the process we discovered **Bayes Theorem**. We will go into the specifics of the math of Bayes theorem later in the book. For now we will take a more intuitive approach. Recall from the preface that Bayes theorem tells us how to compute the probability of an event given previous information. That is exactly what we have been doing in this chapter. With luck our code should match the Bayes Theorem equation! \n",
- "\n",
- "We implemented the `update()` function with this probability calculation:\n",
- "\n",
- "$$ \\mathtt{posterior} = \\frac{\\mathtt{evidence}\\times \\mathtt{prior}}{\\mathtt{normalization}}$$ \n",
- "\n",
- "To review, the *prior* is the probability of something happening before we include the measurement and the *posterior* is the probability we compute after incorporating the information from the measurement.\n",
- "\n",
- "Bayes theorem is\n",
- "\n",
- "$$P(A|B) = \\frac{P(B | A)\\, P(A)}{P(B)}\\cdot$$\n",
- "\n",
- "If you are not familiar with this notation, let's review. $P(A)$ means the probability of event $A$. If $A$ is the event of a fair coin landing heads, then $P(A) = 0.5$.\n",
- "\n",
- "$P(A|B)$ is called a **conditional probability**. That is, it represents the probability of $A$ happening *if* $B$ happened. For example, it is more likely to rain today if it also rained yesterday because rain systems tend to last more than one day. We'd write the probability of it raining today given that it rained yesterday as $P(\\mathtt{rain_{today}}|\\mathtt{rain_{yesterday}})$.\n",
- "\n",
- "In Bayes theorem $P(A)$ is the *prior*, $P(B)$ is the *evidence*, and $P(A|B)$ is the *posterior*. By substituting the mathematical terms with the corresponding words you can see that Bayes theorem matches out update equation. Let's rewrite the equation in terms of our problem. We will use $x_i$ for the position at *i*, and $Z$ for the measurement. Hence, we want to know $P(x_i|Z)$, that is, the probability of the dog being at $x_i$ given the measurement $Z$. \n",
- "\n",
- "So, let's plug that into the equation and solve it.\n",
- "\n",
- "$$P(x_i|Z) = \\frac{P(Z|x_i) P(x_i)}{P(Z)}$$\n",
- "\n",
- "That looks ugly, but it is actually quite simple. Let's figure out what each term on the right means. First is $P(Z|x_i)$. This is the probability for the measurement at every cell $x_i$. $P(x_i)$ is the *prior* - our belief before incorporating the measurements. We multiply those together. This is just the unnormalized multiplication in the `update()` function, where `belief` is our prior $P(x_i)$.\n",
- "\n",
- "```python\n",
- "for i, val in enumerate(map_):\n",
- " if val == z:\n",
- " belief[i] *= correct_scale\n",
- " else:\n",
- " belief[i] *= 1.\n",
- "```\n",
- "\n",
- "I added the `else` here, which has no mathematical effect, to point out that every element in $x$ (called `belief` in the code) is multiplied by a probability. You may object that I am multiplying by a scale factor, which I am, but this scale factor is derived from the probability of the measurement being correct vs the probability being incorrect.\n",
- "\n",
- "The last term to consider is the denominator $P(Z)$. This is the probability of getting the measurement $Z$ without taking the location into account. We compute that by taking the sum of $x$, or `sum(belief)` in the code. That is how we compute the normalization! So, the `update()` function is doing nothing more than computing Bayes theorem."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "## Total Probability Theorem\n",
- "\n",
- "We know now the formal mathematics behind the `update()` function; what about the `predict()` function? `predict()` implements the **total probability theorem**. Let's recall what `predict()` computed. It computed the probability of being at any given position given the probability of all the possible movement events. Let's express that as an equation. The probability of being at any position $i$ at time $t$ can be written as $P(X_i^t)$. We computed that as the sum of the prior at time $t-1$ $P(X_i^{t-1})$ multiplied by the probability of moving from cell $x_j$ to $x_i$. That is\n",
- "\n",
- "$$P(X_i^t) = \\sum_j P(X_i^{t-1}) P(x_i | x_j)$$\n",
- "\n",
- "That equation is called the *total probability theorem*. Quoting from Wikipedia [6] \"It expresses the total probability of an outcome which can be realized via several distinct events\". I could have given you that equation and implemented `predict()`, but your chances of understanding why the equation works would be slim. As a reminder, here is the code that computes this equation\n",
- "\n",
- "```python\n",
- "for i in range(N):\n",
- " for k in range (kN):\n",
- " index = (i + (width-k) - offset) % N\n",
- " result[i] += prob_dist[index] * kernel[k]\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The code is very short, but the result is huge! We have implemented a form of a Bayesian filter. We have learned how to start with no information and derive information from noisy sensors. Even though the sensors in this chapter are very noisy (most sensors are more than 80% accurate, for example) we quickly converge on the most likely position for our dog. We have learned how the predict step always degrades our knowledge, but the addition of another measurement, even when it might have noise in it, improves our knowledge, allowing us to converge on the most likely result.\n",
- "\n",
- "If you followed the math carefully you will realize that all of this math is exact. The bar charts that we are displaying are not an *estimate* or *guess* - they are mathematically exact results that exactly represent our knowledge. The knowledge is probabilistic, to be sure, but it is exact, and correct.\n",
- "\n",
- "Furthermore, through basic reasoning we were able to discover two extremely important theorems: Bayes theorem and the total probability theorem. I hope you spent time on those sections as in almost any other source they will express filtering algorithms in terms of these two theorems. It will be your job to understand what these equations mean and how to turn them into code. \n",
- "\n",
- "This book is mostly about the Kalman filter. In the g-h filter chapter I told you that the Kalman filter is a type of g-h filter. It is also a type of Bayesian filter. It also uses Bayes theorem and the total probability theorem to filter data, although with a different set of assumptions and conditions than used in this chapter.\n",
- "\n",
- "The discrete Bayes filter allows us to filter sensors and track an object, but we are a long way from tracking an airplane or a car. This code only handles the 1 dimensional case, whereas cars and planes operate in 2 or 3 dimensions. Also, our position vector is *multimodal*. It expresses multiple beliefs at once. Imagine if your GPS told you \"it's 20% likely that you are here, but 10% likely that you are on this other road, and 5% likely that you are at one of 14 other locations\". That would not be very useful information. Also, the data is discrete. We split an area into 10 (or whatever) different locations, whereas in most real world applications we want to work with continuous data. We want to be able to represent moving 1 km, 1 meter, 1 mm, or any arbitrary amount, such as 2.347 cm. \n",
- "\n",
- "Finally, the bar charts may strike you as being a bit less certain than we would want. A 25% certainty may not give you a lot of confidence in the answer. Of course, what is important here is the ratio of this probability to the other probabilities in your vector. If the next largest bar is 23% then we are not very knowledgeable about our position, whereas if the next largest is 3% we are in fact quite certain. But this is not clear or intuitive. However, there is an extremely important insight that Kalman filters implement that will significantly improve our accuracy from the same data.\n",
- "\n",
- "\n",
- "**If you can understand this chapter you will be able to understand and implement Kalman filters.** I cannot stress this enough. If anything is murky, go back and reread this chapter and play with the code. The rest of this book will build on the algorithms that we use here. If you don't intuitively understand why this filter works, and can't at least work through the math, you will have little success with the rest of the material. However, if you grasp the fundamental insight - multiplying probabilities when we measure, and shifting probabilities when we update leads to a converging solution - then you understand everything important you need for the Kalman filter. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## References"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- " * [1] D. Fox, W. Burgard, and S. Thrun. \"Monte carlo localization: Efficient position estimation for mobile robots.\" In *Journal of Artifical Intelligence Research*, 1999.\n",
- " \n",
- " http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume11/fox99a-html/jair-localize.html\n",
- "\n",
- "\n",
- " * [2] Dieter Fox, et. al. \"Bayesian Filters for Location Estimation\". In *IEEE Pervasive Computing*, September 2003.\n",
- " \n",
- " http://swarmlab.unimaas.nl/wp-content/uploads/2012/07/fox2003bayesian.pdf\n",
- " \n",
- " \n",
- " * [3] Sebastian Thrun. \"Artificial Intelligence for Robotics\".\n",
- " \n",
- " https://www.udacity.com/course/cs373\n",
- " \n",
- " \n",
- " * [4] Khan Acadamy. \"Introduction to the Convolution\"\n",
- " \n",
- " https://www.khanacademy.org/math/differential-equations/laplace-transform/convolution-integral/v/introduction-to-the-convolution\n",
- " \n",
- " \n",
- "* [5] Wikipedia. \"Convolution\"\n",
- "\n",
- " http://en.wikipedia.org/wiki/Convolution\n",
- "\n",
- "* [6] Wikipedia. \"Law of total probability\"\n",
- "\n",
- " http://en.wikipedia.org/wiki/Law_of_total_probability\n",
- " \n",
- "* [7] Wikipedia. \"Time Evolution\"\n",
- "\n",
- " https://en.wikipedia.org/wiki/Time_evolution"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.4.1"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "[Table of Contents](http://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/table_of_contents.ipynb)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Discrete Bayes Filter"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#format the book\n",
+ "%matplotlib inline\n",
+ "%load_ext autoreload\n",
+ "%autoreload 2 \n",
+ "from __future__ import division, print_function\n",
+ "import sys\n",
+ "sys.path.insert(0,'./code')\n",
+ "from book_format import load_style\n",
+ "load_style()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The Kalman filter belongs to a family of filters called **Bayesian filters**. Most textbook treatments of the Kalman filter present the Bayesian formula, perhaps shows how it factors into the Kalman filter equations, but mostly keeps the discussion at a very abstract level. \n",
+ "\n",
+ "That approach requires a fairly sophisticated understanding of several fields of mathematics, and it still leaves much of the work of understanding and forming an intuitive grasp of the situation in the hands of the reader.\n",
+ "\n",
+ "I will use a different way to develop the topic, to which I owe the work of Dieter Fox and Sebastian Thrun a great debt. It depends on building an intuition on how Bayesian statistics work by tracking an object through a hallway - they use a robot, I use a dog. I like dogs, and they are less predictable than robots which imposes interesting difficulties for filtering. The first published example of this that I can find seems to be Fox 1999 [1], with a fuller example in Fox 2003 [2]. Sebastian Thrun also uses this formulation in his excellent Coursera course Artificial Intelligence for Robotics [3]. In fact, if you like watching videos, I highly recommend pausing reading this book in favor of first few lessons of that course, and then come back to this book for a deeper dive into the topic.\n",
+ "\n",
+ "Let's now use a simple thought experiment, much like we did with the g-h filter, to see how we might reason about the use of probabilities for filtering and tracking."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Tracking a Dog"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let's begin with a simple problem. We have a dog friendly workspace, and so people bring their dogs to work. Occasionally the dogs wander out of offices and down the halls. We want to be able to track them. So during a hackathon somebody created a little sonar sensor to attach to the dog's collar. It emits a signal, listens for the echo, and based on how quickly an echo comes back we can tell whether the dog is in front of an open doorway or not. It also senses when the dog walks, and reports in which direction the dog has moved. It connects to our network via wifi and sends an update once a second.\n",
+ "\n",
+ "I want to track my dog Simon, so I attach the device to his collar and then fire up Python, ready to write code to track him through the building. At first blush this may appear impossible. If I start listening to the sensor of Simon's collar I might read 'door', 'hall', 'hall', and so on. How can I use that information to determine where Simon is?\n",
+ "\n",
+ "To keep the problem small enough to plot easily we will assume that there are only 10 positions in a single hallway to consider, which we will number 0 to 9, where 1 is to the right of 0, 2 is to the right of 1, and so on. For reasons that will be clear later, we will also assume that the hallway is circular or rectangular. If you move right from position 9, you will be at position 0. \n",
+ "\n",
+ "When I begin listening to the sensor I have no reason to believe that Simon is at any particular position in the hallway. He is equally likely to be in any position. Their are 10 positions, so the probability that he is in any given position is 1/10. \n",
+ "\n",
+ "Let's represent our belief of his position at any time in a NumPy array."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[ 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "belief = np.array([1/10]*10)\n",
+ "np.set_printoptions(precision=3, linewidth=50)\n",
+ "print(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In Bayesian statistics this is called our **prior**. It basically means the probability prior to incorporating measurements or other information. More completely, this is called the **prior probability distribution**, but that is a mouthful and so it is normally shorted to *prior*. A **probability distribution** is a collection of all possible probabilities for an event. Probability distributions always to sum to 1 because *something* had to happen; the distribution lists all the different *somethings* and the probability of each.\n",
+ "\n",
+ "I'm sure you've used probabilities before - as in \"the probability of rain today is 30%\". The last paragraph sounds like more of that. But Bayesian statistics was a revolution in probability because it treats the probability as a *belief* about a single event. Let's take an example. I know if I flip a fair coin a infinitely many times 50% of the flips will be heads and 50% tails. That is standard probability, not Bayesian, and is called **frequentist statistics** to distinguish it from Bayes. Now, let's say I flip the coin one more time. Which way do I believe it landed? Frequentist probablility has nothing to say about that; it will merely state that 50% of coin flips land as heads. Bayes treats this as a belief about a single event - the strength of my belief that *this specific* coin flip is heads is 50%.\n",
+ "\n",
+ "There are more differences, but for now recognize that Bayesian statistics reasons about our belief about a single event, whereas frequentists reason about collections of events. In this rest of this chapter, and most of the book, when I talk about the probability of something I am referring to the probability that some specific thing is true. When I do that I'm taking the Bayesian approach.\n",
+ "\n",
+ "Now let's create a map of the hallway in another list. Suppose there are first two doors close together, and then another door quite a bit further down the hallway. We will use 1 to denote a door, and 0 to denote a wall:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "hallway = np.array([1, 1, 0, 0, 0, 0, 0, 0, 1, 0])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "So I start listening to Simon's transmissions on the network, and the first data I get from the sensor is \"door\". For the moment assume the sensor always returns the correct answer. From this I conclude that he is in front of a door, but which one? I have no idea. I have no reason to believe he is is in front of the first, second, or third door. But what I can do is assign a probability to each door. All doors are equally likely, and there are three of them, so I assign a probability of 1/3 to each door. "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGXdJREFUeJzt3X9QlWX+//EXP1IPRUyuQSAoYC6mEiknNo6UzQ6dWc01\nd0rSdi3Q1oUtU1l3XIodV0Wt3GFXTdA1B9laC3dq3CZZBxo1YqFZCU9rpq7FrtnAOa2uobmhI9yf\nP/p6vp0O8iNvuQ/yfMw4A9d9Xed+n/fgnBe3l/cdZBiGIQAAAABXLNjqAgAAAIBrBeEaAAAAMAnh\nGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwSbfhuqamRtOnT1dsbKyCg4NVXl7e7Yse\nPHhQkydPVlhYmGJjY7Vy5UpTigUAAAACWbfh+ty5c7r99tu1bt062Ww2BQUFdTn/zJkzuu+++xQd\nHa2GhgatW7dOa9euVXFxsWlFAwAAAIEoqDdPaAwPD9fGjRv16KOPXnZOaWmpCgoK5PF4NHjwYEnS\nqlWrVFpaqk8//fTKKwYAAAAClOl7ruvr63X33Xd7g7UkOZ1ONTc36/jx42afDgAAAAgYoWa/oNvt\n1ogRI3zGoqKivMdGjhzpHW9tbTX79AAAAECfiYiI8Pne9CvX3e3JBgAAAK5VpofrW265RW6322fM\n4/F4jwEAAADXKtO3haSn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/f7/rqwsDDddNNNflcqB5IlS5Zo+vTpiouL02effaaVK1fqyy+/1GOPPWZ1aZZYvHixHA6HVq9e\nraysLB04cEAbNmwY8LdYMwxDL774ombNmqWwsDCry7HcjBkz9OyzzyohIUFjx47VgQMH9Lvf/W7A\n/r25pKqqSu3t7RozZow++ugj/fKXv9Rtt92mnJwcq0vrHQvvVNKnSkpKjPj4eGPw4MGG3W433nnn\nHatLsszevXuNoKAgIygoyAgODvZ+nZOTY3VplvlmLy79Wb58udWlWSY7O9sYOXKkMXjwYCMyMtK4\n7777jKqqKqvLCijcis8wZs2aZcTExBiDBg0yhg8fbjz00EPG4cOHrS7LUrt27TJSUlKMIUOGGElJ\nScaGDRusLslye/bsMYKDg439+/dbXUpA+OKLL4xf/OIXRnx8vGGz2YzExETjmWeeMc6fP291aZba\nsWOHMWrUKGPw4MFGdHS0sWDBAuPMmTNWl9VrPP4cAAAAMMk1v+caAAAA6CuEawAAAMAkhGsAAADA\nJIRrAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAk/wcdEXum4t06AAAAAABJRU5ErkJg\ngg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from book_format import figsize, set_figsize\n",
+ "import book_plots as bp\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "belief = np.array([1./3, 1./3, 0, 0, 0, 0, 0, 0, 1./3, 0])\n",
+ "set_figsize(y=2)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We call this a multimodal distribution because we have multiple beliefs about the position of our dog. Of course we are not saying that we think he is simultaneously in three different locations, merely that so far we have narrowed down our knowledge in his position to be one of these three locations. My (Bayesian) belief is that there is a 33.3% chance of being at door 0, 33.3% at door 1, and a 33.3% chance of being at door 8. \n",
+ "\n",
+ "I hand coded the `belief` array in the code above. How would we implement this in code? Well, hallway represents each door as a 1, and wall as 0, so we will multiply the hallway variable by the percentage, like so;"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[ 0.333 0.333 0. 0. 0. 0. 0. 0.\n",
+ " 0.333 0. ]\n"
+ ]
+ }
+ ],
+ "source": [
+ "pbelief = hallway * (1/3)\n",
+ "print(pbelief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Extracting Information from Multiple Sensor Readings"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let's put Python aside and think about the problem a bit. Suppose we were to read the following from Simon's sensor:\n",
+ "\n",
+ " * door\n",
+ " * move right\n",
+ " * door\n",
+ " \n",
+ "\n",
+ "Can we deduce where Simon is at the end of that sequence? Of course! Given the hallway's layout there is only one place where you can be in front of a door, move once to the right, and be in front of another door, and that is at the left end. Therefore we can confidently state that Simon is in front of the second doorway. If this is not clear, suppose Simon had started at the second or third door. After moving to the right, his sensor would have returned 'wall'. That doesn't match the sensor readings, so we know he didn't start there. We can continue with that logic for all the remaining starting positions. Therefore the only possibility is that he is now in front of the second door. We implement this in Python with:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "belief = np.array([0., 1., 0., 0., 0., 0., 0., 0., 0., 0.])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Obviously I carefully constructed the hallway layout and sensor readings to give us an exact answer quickly. Real problems will not be so clear cut. But this should trigger your intuition - the first sensor reading only gave us very low probabilities (0.333) for Simon's location, but after a position update and another sensor reading we knew much more about where he is. You might suspect, correctly, that if you had a very long hallway with a large number of doors that after several sensor readings and positions updates we would either be able to know where Simon was, or have the possibilities narrowed down to a small number of possibilities. For example, suppose we had a long sequence of \"door, right, door, right, wall, right, wall, right, door, right, door, right, wall, right, wall, right, wall, right, wall, right, door\". Simon could only have started in a location where his movements had a door sequence of [1,1,0,0,1,1,0,0,0,0,1] in the hallway. There might be only one match for that, or at most a few. Either way we will be far more certain about his position then when we started.\n",
+ "\n",
+ "We could work through the code to implement this solution, but instead let us consider a real world complication to the problem."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Noisy Sensors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Perfect sensors are rare. Perhaps the sensor would not detect a door if Simon sat in front of it while scratching himself, or it might report there is a door if he is facing towards the wall instead of down the hallway. So in practice when I get a report 'door' I cannot assign 1/3 as the probability for each door. I have to assign something less than 1/3 to each door, and then assign a small probability to each blank wall position. \n",
+ "\n",
+ "At this point it doesn't matter exactly what numbers we assign; let us say that the probability of the sensor being right is 3 times more likely to be right than wrong. How would we do this?\n",
+ "\n",
+ "At first this may seem like an insurmountable problem. If the sensor is noisy it casts doubt on every piece of data. How can we conclude anything if we are always unsure?\n",
+ "\n",
+ "The answer, as with the problem above, is probabilities. We are already comfortable assigning a probabilistic belief about the location of the dog; now we have to incorporate the additional uncertainty caused by the sensor noise. Lets say we get a reading of 'door'. We already said that the sensor is three times as likely to be correct as incorrect, so we should scale the probability distribution by 3 where there is a door. If we do that the result will no longer be a probability distribution, but we will learn how to correct that in a moment.\n",
+ "\n",
+ "Let's look at that in Python code. Here I use the variable `z` to denote the measurement as that is the customary choice in the literature (`y` is also commonly used). "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sum = 1.6\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSF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9q3b5/ef/99ffe739XMmTP1wQcfWF2a5d577z29+OKLuvXWW/n7\nI2ns2LFyu93eP/v377e6JMt89tlnmjx5soKCglRVVaVDhw7p+eefV1RUlNWlWeb999/3+floampS\nUFCQHnzwQatLs8zq1av1wgsvaMOGDTp8+LDWrVun0tJSrVmzxurSLPXoo4+qpqZGv//97/Xhhx/K\n6XQqKytLLS0tVpfWN8YgkJ6ebixYsMBnbMyYMUZhYaFFFQWO6667zqioqLC6jIDz+eefGyEhIcZb\nb71ldSkBZcSIEcbvfvc7q8uw1GeffWbcdNNNxp49e4ypU6caixYtsrokS61YscKYMGGC1WUEjMLC\nQiMzM9PqMgJacXGxcf311xvt7e1Wl2KZe++918jJyfEZe/jhh43vf//7FlVkvf/+979GaGio8eab\nb/qMp6WlGUVFRRZV9c1c9Veuv8kj3IHTp0+rs7NT119/vdWlBISOjg699tpram9v11133WV1OZZa\nsGCBZs2apSlTpsjgv6xIkpqbmzVy5EglJSVpzpw5+uc//2l1SZbZvn270tPT9eCDDyo6OloTJ07U\nxo0brS4rYBiGoc2bN+tHP/qRd7vewWjatGnatWuXDh8+LEn66KOPtHv3bk2fPt3iyqxz4cIFdXR0\n+P1cDBs2bMDdytvjbiED3YkTJ9TR0aHo6Gif8aioKL+H3QAXLV68WBMnTlRGRobVpVhq//79ysjI\n0Llz52Sz2bRt2zYlJydbXZZlXnzxRTU3N2vr1q2SeCKtJN1xxx2qqKjQ2LFj5fF4VFxcLIfDoQMH\nDmjEiBFWl9fvmpubVVpaqoKCAj3xxBPat2+f9778hQsXWlyd9WpqavSvf/1LP/7xj60uxVI//elP\n9cknn+iWW25RaGioLly4oKKiIu82x4NReHi4MjIyVFxcrAkTJig6Olqvvvqq3nvvPY0ZM8bq8vrk\nqg/XQF8VFBSovr5edXV1gz48jR07Vn/729/U1tamP/7xj5o9e7Z2794tu91udWn97vDhw3ryySdV\nV1enkJAQSV9ehRvsV6+/973veb+eMGGCMjIylJiYqIqKikG5BWtnZ6fS09O1atUq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ClvxGcbs\n2bON2NhYY8iQIcbIkSONBx54wDh48KDVZVlqx44dRmpqqjFs2DAjOTnZ2LBhg9UlWW7Xrl1GcHCw\nsXfvXqtLCQiff/658bOf/cxISEgwbDabkZSUZDz55JPGuXPnrC7NUtu2bTNuuukmY+jQoUZMTIyx\naNEi4/Tp01aX1Wc8/hwAAAAwyVV/zzUAAADQXwjXAAAAgEkI1wAAAIBJCNcAAACASQjXAAAAgEkI\n1wAAAIBJCNcAAACASQjXAAAAgEn+D/DD8FeOe0XrAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def update(map_, belief, z, correct_scale):\n",
+ " for i, val in enumerate(map_):\n",
+ " if val == z:\n",
+ " belief[i] *= correct_scale\n",
+ "\n",
+ "belief = np.array([0.1] * 10)\n",
+ "reading = 1 # 1 is 'door'\n",
+ "update(hallway, belief, z=reading, correct_scale=3.)\n",
+ "print('sum =', sum(belief))\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We can see that this is not a probability distribution because it does not sum to 1.0. But we can see that the code is doing mostly the right thing - the doors are assigned a number (0.3) that is 3 times higher than the walls (0.1). All we need to do is normalize the result so that the probabilities correctly sum to 1.0. Normalization is done by dividing each element by the sum of all elements in the list. \n",
+ "\n",
+ "Also, it is a bit odd to be talking about \"3 times as likely to be right as wrong\". We are working in probabilities, so let's specify the probability of the sensor being correct, and computing the scale factor from that."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sum = 1.0\n",
+ "probability of door = 0.1875\n",
+ "probability of wall = 0.0625\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYA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AAb377rv67ne/q1mzZum9\n996zujTLvfPOO3r++ed188038/9H0vjx4+V2u71fBw8etLoky3z66aeaOnWqgoKCVFVVpSNHjui5\n555TVFSU1aVZ5t133/X599HU1KSgoCDdf//9VpdmmTVr1mjLli3auHGjjh49qvXr16u0tFRr1661\nujRLPfzww6qpqdEf/vAHvf/++3I6ncrKylJra6vVpfWPMQSkp6cbixYt8hkbN26cUVhYaFFFgeOa\na64xKioqrC4j4Hz22WdGSEiI8cYbb1hdSkAZOXKk8fvf/97qMiz16aefGmPHjjX27dtn3Hnnncbi\nxYutLslSTz75pDFp0iSrywgYhYWFRmZmptVlBLTi4mLjuuuuMzo6OqwuxTIzZswwcnJyfMYefPBB\n4/vf/75FFVnvf//7nxEaGmq8/vrrPuNpaWlGUVGRRVV9M1f8J9ff5BbuwOnTp9XV1aXrrrvO6lIC\nQmdnp1555RV1dHTojjvusLocSy1atEhz5szRtGnTZPAnK5KklpYWjR49WklJSZo3b57+9a9/WV2S\nZXbu3Kn09HTdf//9io6O1uTJk7Vp0yarywoYhmFo69at+vGPf+y9XO9QNH36dO3Zs0dHjx6VJH3w\nwQfau3ev7r77bosrs86FCxfU2dnp9+9ixIgRg24rb69XCxnsTpw4oc7OTkVHR/uMR0VF+d3sBvjS\nkiVLNHnyZGVkZFhdiqUOHjyojIwMnTt3TjabTTt27FBycrLVZVnm+eefV0tLi7Zv3y6JO9JK0m23\n3aaKigqNHz9eHo9HxcXFcjgcOnTokEaOHGl1eQOupaVFpaWlKigo0OOPP64DBw549+U/8sgjFldn\nvZqaGv373//WT37yE6tLsdTPfvYzffzxx7rpppsUGhqqCxcuqKioyHuZ46EoPDxcGRkZKi4u1qRJ\nkxQdHa2XX35Z77zzjsaNG2d1ef1yxYdroL8KCgpUX1+vurq6IR+exo8fr7///e9qb2/Xn/70J82d\nO1d79+6V3W63urQBd/ToUT3xxBOqq6tTSEiIpC8+hRvqn15/73vf8z6eNGmSMjIylJiYqIqKiiF5\nCdauri6lp6dr9erVkq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bcuXON2NhYY9iwYcbo0aON++67zzh8+LDVZVlq165dRmpqqjFi\nxAgjOTnZ2Lhxo9UlWW7Pnj1GcHCwsX//fqtLCQifffaZ8fOf/9xISEgwbDabkZSUZDzxxBPGuXPn\nrC7NUjt27DDGjh1rDB8+3IiJiTEWL15snD592uqy+o3bnwMAAAAmueL3XAMAAAADhXANAAAAmIRw\nDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmOT/AB5FzmwxXQsBAAAAAElF\nTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def normalize(distribution):\n",
+ " assert distribution.dtype.kind == 'f'\n",
+ " \"\"\" Normalize distribution so it sums to 1.0\"\"\"\n",
+ " distribution /= sum(distribution.astype(float)) \n",
+ "\n",
+ "def update(map_, belief, z, prob_correct):\n",
+ " scale = prob_correct / (1. - prob_correct)\n",
+ " for i, val in enumerate(map_):\n",
+ " if val == z:\n",
+ " belief[i] *= scale\n",
+ " normalize(belief)\n",
+ "\n",
+ "belief = np.array([0.1] * 10)\n",
+ "update(hallway, belief, 1, prob_correct=.75)\n",
+ "\n",
+ "print('sum =', sum(belief))\n",
+ "print('probability of door =', belief[0])\n",
+ "print('probability of wall =', belief[2])\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " We can see from the output that the sum is now 1.0, and that the probability of a door vs wall is still three times larger. The result also fits our intuition that the probability of a door must be less than 0.333, and that the probability of a wall must be greater than 0.0. Finally, it should fit our intuition that we have not yet been given any information that would allow us to distinguish between any given door or wall position, so all door positions should have the same value, and the same should be true for wall positions.\n",
+ " \n",
+ "This result is called the **posterior**, which is short for **posterior probability distribution**. All this means is a probability distribution *after* incorporating the measurement information (posterior means 'after' in this context). To review, the *prior* is the probability distribution before including the measurement's information. Another term is the **likelihood** - this is the probability for the **evidence** (the measurement in this case) being true. That gives us this equation:\n",
+ "\n",
+ "$$ \\mathtt{posterior} = \\frac{\\mathtt{prior}\\times \\mathtt{likelihood}}{\\mathtt{normalization}}$$ \n",
+ "\n",
+ "It is very important to learn and internalize these terms as most of the literature uses them exclusively. You will be unable to read it if these terms aren't crystal clear to you. \n",
+ "In this chapter I will keep slipping these terms in so you get used to them."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Incorporating Movement Data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Recall how quickly we were able to find an exact solution to our dog's position when we incorporated a series of measurements and movement updates. However, that occurred in a fictional world of perfect sensors. Might we be able to find an exact solution even in the presence of noisy sensors?\n",
+ "\n",
+ "Unfortunately, the answer is no. Even if the sensor readings perfectly match an extremely complicated hallway map we could not say that we are 100% sure that the dog is in a specific position - there is, after all, the possibility that every sensor reading was wrong! Naturally, in a more typical situation most sensor readings will be correct, and we might be close to 100% sure of our answer, but never 100% sure. This may seem complicated, but lets go ahead and program the math, which as we have seen is quite simple.\n",
+ "\n",
+ "First let's deal with the simple case - assume the movement sensor is perfect, and it reports that the dog has moved one space to the right. How would we alter our `belief` array?\n",
+ "\n",
+ "I hope after a moment's thought it is clear that we should shift all the values one space to the right. If we previously thought there was a 50% chance of Simon being at position 3, then after the move to the right we should believe that there is a 50% chance he is at position 4. So let's implement that. Recall that the hallway is circular, so we will use modulo arithmetic to perform the shift correctly."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACrCAYAAACt8bDOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVGX+B/D3HRAYlFBCfpOAIv5CVEaKkcwKcSl/0Fqo\nWxpkGZSmUptLy+aPUCs7lJhom4ZoWbpH19okj7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B4REYH8/Pxm\nx3z++efw8/NDZmYm/Pz84Ovri5iYGPz000/yRU1EREREZIEkIYRo6WBZWRm8vLyQm5uLsLAwQ/uy\nZcuwdetWnD592mRMXFwcMjIyMGLECKxatQoA8MorrwAACgoKIEmSoW91dbXh+7Nnz3b8aoiIiIiI\nbjN/f3/D946OjkbH2lwW0l6NjY24fv06tmzZggEDBgAAtmzZgoCAABQWFmL06NFyT0lEREREZBFa\nLa6dnZ1hZWWFiooKo/aKigq4u7s3O8bd3R3W1taGwhoABgwYACsrK3z//fctFtcajaa9sbdLYWFh\np8zTlTAnppgTU8yJKebEFHNiijkxxZyYYk6MdZV83Lr64rdaXXNtY2OD4OBg7N2716g9KysLWq22\n2TFhYWGor69HSUmJoa2kpAQNDQ3o169fe+ImIiIiIupS2tznOiEhAZs2bcLGjRtx6tQpzJ8/H3q9\nHnFxcQCAxMREhIeHG/qHh4dj1KhReOaZZ6DT6VBcXIxnnnkG9913n8W/CyEiIiIi6og211xHR0fj\n0qVLSE5ORnl5OQIDA5GZmWnY41qv1xvdpZYkCV9++SVeeukljB07Fmq1GhEREUhJSbl9V0FERERE\nZAHM+kBjfHw84uPjmz2Wnp5u0ubm5obt27d3LDIiIiIioi7GrMefExERERFR21hcExERERHJhMU1\nEREREZFMWFwTEREREcmExTURERERkUxYXBMRERERyYTFNRERERGRTFhcExERERHJhMU1EREREZFM\nWFwTEREREcmExTURERERkUxYXBMRERERyYTFNRERERGRTMwqrtPS0uDr6wu1Wg2NRoO8vDyzTn72\n7Fk4ODjAwcGhQ0ESEREREXUFbRbX27Ztw4IFC5CUlASdTgetVovIyEhcvHix1XE3btzA9OnT8cAD\nD0CSJNkCJiIiIiKyVG0W1ykpKYiNjcXs2bMREBCA1NRUuLu7Y926da2OW7RoEUaMGIEnnngCQgjZ\nAiYiIiIislStFtc3btxAUVERIiIijNojIiKQn5/f4rjdu3dj9+7dWLNmDQtrIiIiIuo2rFs7WFlZ\niYaGBri6uhq1u7i4QK/XNzumrKwM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CYtrIiIiIiKZsLgmIiIiIpIJi2siIiIiIpmwuCYiIiIikgmLayIiIiIimbC4JiIi\nIiKSyf8BpsgRgaw7NugAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACrCAYAAACt8bDOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+P/DXGUAZXFAkEBVZ1HDDBYgEN/TaFFnmzSS1\nVNAySQ1F+xpG1w33e3FLzO0ClQveFm9XyQsliCSWhKgpmoqpXRhKUnADlPn8/vDHPBpn2PTAYeT1\nfDx4POBzPuec9/kM1GuOn/kcSQghQEREREREj0yldAFERERERI8LhmsiIiIiIpkwXBMRERERyYTh\nmoiIiIhIJgzXREREREQyYbgmIiIiIpIJwzURNQrr169Hjx49YGNjA5VKhYULFypdktkJCAiASmX4\nv43U1NQ6H09XV1e4ubnV2fGJiOTEcE1EZmvt2rVQqVRQqVT44YcfKu23a9cuhIWFoby8HGFhYViw\nYAECAgKwYMECqFQqxMfH12PV5k2SpFq114Srq6tRaH/w2I9yfCKi+mSpdAFERA9r8+bNBt/7+vqa\n7Ld3714AwMcff2zQJyUlBcCjBcPG7umnn8aZM2dgb2//SMep6jU4cODAIx2biKg+8c41EZmlQ4cO\nIScnB2PGjEGHDh2QkJCAGzdumOybl5cHAHB0dDS5nQ+qfXhqtRpPPvkk7Ozs6uwcbm5unBZCRGaD\n4ZqIzFLFXes33ngDEyZMwK1bt7B9+3aDPhXTPlJTUwHcD2kV00iGDBmCRYsWAQBCQkL07SqVCpcv\nX9YfQ6fTYevWrejfvz9sbW2hVqvh6emJ5cuX4+7du0Z1qVQquLm5obi4GDNnzoSLiwusrKywdu3a\nKq+nYu5ySEgITp8+jREjRsDOzg7NmzfHoEGD8O233xrtExcXp5/vfOTIEQQGBqJ169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iuiYiIiIhkwnBNRERERCQThmsiIiIiIpkwXBMRERERyYTh\nmoiIiIhIJgzXREREREQyYbgmIiIiIpLJ/wM5aPN07qOu5AAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def perfect_predict(belief, move):\n",
+ " \"\"\" move the position by 'move' spaces, where positive is \n",
+ " to the right, and negative is to the left\n",
+ " \"\"\"\n",
+ " n = len(belief)\n",
+ " result = np.zeros(n)\n",
+ " for i in range(n):\n",
+ " result[i] = belief[(i-move) % n]\n",
+ " belief[:] = result # copy back to original array\n",
+ " \n",
+ "belief = np.array([.35, .1, .2, .3, 0, 0, 0, 0, 0, .05])\n",
+ "bp.bar_plot(belief, title='Before prediction')\n",
+ "plt.show()\n",
+ "\n",
+ "perfect_predict(belief, 1)\n",
+ "bp.bar_plot(belief, title='After prediction')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We can see that we correctly shifted all values one position to the right, wrapping from the end of the array back to the beginning.\n",
+ "\n",
+ "You will often see this referred to as the state or system **evolution**, which is short for **time evolution** [7]. Another term is **system propogation**. This term refers to how the state of the system changes over time. For filters, this time is usually discrete. For our dog tracking, the system state is the position of the dog, so the state evolution is the position after a discrete amount of time has passed. I haven't defined 'state' or 'system' yet, but I hope it is clear in context. The **system** is what we are trying to model or filter, and the state is its current configuration or value. Except in simulations we rarely know the actual state, so we say our filters produce the **estimated state** of the system. In practice this often gets called the state, so be careful to understand if the reference is to the state of the filter (which is the estimated state), or the state of the system (which is the actual state).\n",
+ "\n",
+ "More terminology - this prediction becomes our new **prior**. Time has moved forward and we made a prediction without benefit of knowing the measurements. "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Adding Noise to the Prediction"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We want to solve real world problems, and we have already stated that all sensors have noise. Therefore the code above must be wrong since it assumes we have perfect measurements. What if the sensor reported that our dog moved one space, but he actually moved two spaces, or zero? Once again this may initially sound like an insurmountable problem, but let's model it and see what happens. Since this is an example we will create a simple noise model for the sensor - later in the book we will handle more difficult errors.\n",
+ "\n",
+ "We will say that when the sensor sends a movement update, it is 80% likely to be right, and it is 10% likely to overshoot one position to the right, and 10% likely to undershoot to the left. That is, if we say the movement was 4 (meaning 4 spaces to the right), the dog is 80% likely to have moved 4 spaces to the right, 10% to have moved 3 spaces, and 10% to have moved 5 spaces.\n",
+ "\n",
+ "This is slightly harder than the math we have done so far, but it is still tractable. Each result in the array now needs to incorporate probabilities for 3 different situations. For example, consider position 9 for the case where the reported movement is 2. It should be clear that after the move we need to incorporate the probability that was at position 7 (9-2). However, there is a small chance that our dog actually moved from either 1 or 3 spaces away due to the sensor noise, so we also need to use positions 6 and 8. How much? Well, we have the probabilities, so we can just multiply and add. It would be 80% of position 7 plus 10% of position 6 and 10% of position 8! Let's try coding that:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGd1JREFUeJzt3X9QVXXCx/EPP/xxKWJyCQJBgXIxlVjlxsaVstmhO2s/\nzJ2StF0LtHVly1TWHZdity1RK3fYVRNqy0GqtXCnxm2SdaDRIhaalfC2Zupa7JIN3NviGpIb+Ajn\n+aNHnr1d5EceOBd4v2acge/5nns+9zvXmQ+HwzkBhmEYAgAAAHDRAq0OAAAAAIwUlGsAAADAJJRr\nAAAAwCSUawAAAMAklGsAAADAJJRrAAAAwCSUawAAAMAkfZbrqqoqzZs3TzExMQoMDFRpaWmfL3ro\n0CHNmTNHISEhiomJ0bp160wJCwAAAPizPsv1mTNndO2112rz5s2y2WwKCA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6666iqrow3I\niL/m+r8f4f7fKisr5XA4LEoFf7Ry5UqVlZVp3759+va3v211HL/U2dmprq4uq2NY4gc/+IE++OAD\nvf/++3r//fflcrlkt9u1aNEiuVwuivX/aW9v15EjR0btyYvZs2fr6NGjXmN///vf+WFd0o4dOzR+\n/HgtWrTI6iiWMwxDgYHeFSwwMHDU/ybsPJvNpsjISJ06dUoVFRW64447rI40ICP+zLX01a/5Fy9e\nrNTUVDkcDj3zzDNej3Afbc6cOaPjx49L+upXmI2NjXK5XPrWt77V/eTN0eaBBx7QSy+9pN27dyss\nLKz7evzQ0FBdcsklFqezxi9+8QvddtttiomJUVtbm3bu3Km3335be/futTqaJc7f7/u/hYSE6PLL\nL/c5UzmarFmzRvPmzVNsbKw+++wzrVu3Tl9++aXuu+8+q6NZYvXq1XI4HNqwYYMyMzN18OBBbd26\nddTfYs0wDD3//PNauHChQkJCrI5jufnz5+uJJ55QfHy8pk2bpoMHD+q3v/3tqP1/c15FRYU6Ozs1\ndepUffTRR/r5z3+ua665RtnZ2VZHGxgL71QypIqKioy4uDhj3Lhxht1uN9555x2rI1lm//79RkBA\ngBEQEGAEBgZ2f52dnW11NMt8fS3O/3vsscesjmaZrKwsY/Lkyca4ceOMiIgI4+abbzYqKiqsjuVX\nuBWfYSxcuNCIjo42xo4da0ycONG46667jCNHjlgdy1J79uwxkpOTjfHjxxuJiYnG1q1brY5kuX37\n9hmBgYHGgQMHrI7iF7744gvjZz/7mREXF2fYbDYjISHBeOSRR4yOjg6ro1lq165dxlVXXWWMGzfO\niIqKMlasWGGcPn3a6lgDxuPPAQAAAJOM+GuuAQAAgKFCuQYAAABMQrkGAAAATEK5BgAAAExCuQYA\nAABMQrkGAAAATEK5BgAAAExCuQYAAABM8r/CGpPpPPs74gAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def predict(belief, move, p_correct, p_under, p_over):\n",
+ " n = len(belief)\n",
+ " result = np.zeros(n)\n",
+ " for i in range(n):\n",
+ " result[i] = (\n",
+ " belief[(i-move) % n] * p_correct +\n",
+ " belief[(i-move-1) % n] * p_over +\n",
+ " belief[(i-move+1) % n] * p_under) \n",
+ " belief[:] = result\n",
+ "\n",
+ "belief = np.array([0., 0., 0., 1., 0., 0., 0., 0., 0., 0.])\n",
+ "predict(belief, move=2, p_correct=.8, p_under=.1, p_over=.1)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The simple test case that we ran appears to work correctly. We initially believed that the dog was in position 3 with 100% certainty; after the movement update we now give an 80% probability to the dog being in position 5, and a 10% chance to undershooting to position 4, and a 10% chance of overshooting to position 6. Let us look at a case where we have multiple beliefs:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGiNJREFUeJzt3X9QlWX+//EXP1IPRkwuQSAoUC6mEiknNo5Uzg6dWao1\nd0rSdi3Q1mDLVNYdl6JpS9TMHTY1oLYcZGst3Klxm2QdaNSIhWYhpDVT12LXbOCcVteQ3NAR7s8f\nfT3fTgf5sd5yH+T5mGEGrvu6zv0+74GZFzc31x1gGIYhAAAAABcs0OoCAAAAgEsF4RoAAAAwCeEa\nAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADBJv+G6trZWs2fPVkxMjAIDA1VRUdHvi+7b\nt0+33nqrQkJCFBMTo1WrVplSLAAAAODP+g3Xp06d0vXXX68NGzbIZrMpICCgz/knT57Ubbfdpqio\nKDU1NWnDhg1av369iouLTSsaAAAA8EcBg3lCY2hoqEpKSnT//fefd05ZWZkKCgrkdrs1evRoSdLq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5/rbj3D/tpqaGjkcDouqgj9aunSpKisrtWvXLn3/+9+3uhy/1N3drZ6eHqvL\nsMRPfvITffTRR/rwww/14YcfqqWlRXa7XfPnz1dLSwvB+v/p6urSgQMHRuzFi5kzZ+rgwYNeY//4\nxz/4ZV3Sli1bNGbMGM2fP9/qUixnGIYCA70jWGBg4Ij/S9g5NptNkZGROnHihKqrq3XXXXdZXdKg\nXPJXrqVv/sy/YMECpaamyuFw6IUXXvB6hPtIc+rUKR0+fFjSN3/CPHLkiFpaWvS9733P8+TNkebh\nhx/Wq6++qu3btyssLMxzP35oaKjGjh1rcXXW+PWvf60777xTMTEx6uzs1NatW/Xuu+9q586dVpdm\niXP7fX9bSEiIrrzySp8rlSPJihUrNHv2bMXGxuqLL77QqlWr9PXXX+uBBx6wujRLLF++XA6HQ2vW\nrFFWVpb27t2rTZs2jfgt1gzD0Msvv6x58+YpJCTE6nIsN2fOHD3zzDOKj4/XlClTtHfvXv3ud78b\nsT8351RXV6u7u1uTJ0/WJ598ol/96le67rrrlJOTY3Vpg2PhTiVDqrS01IiLizNGjx5t2O124733\n3rO6JMvs3r3bCAgIMAICAozAwEDP5zk5OVaXZpnv9uLcx1NPPWV1aZbJzs42Jk6caIwePdqIiIgw\nbrvtNqO6utrqsvwKW/EZxrx584zo6Ghj1KhRxvjx44177rnHOHDggNVlWWrHjh1GcnKyMWbMGCMx\nMdHYtGmT1SVZbteuXUZgYKDR2NhodSl+4auvvjJ++ctfGnFxcYbNZjMSEhKMxx9/3Dh9+rTVpVlq\n27ZtxjXXXGOMHj3aiIqKMpYsWWKcPHnS6rIGjcefAwAAACa55O+5BgAAAIYK4RoAAAAwCeEaAAAA\nMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwyf8B0J+h4dvC6WcAAAAASUVORK5C\nYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "belief = np.array([0, 0, .4, .6, 0, 0, 0, 0, 0, 0])\n",
+ "predict(belief, move=2, p_correct=.8, p_under=.1, p_over=.1)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Here the results are more complicated, but you should still be able to work it out in your head. The 0.04 is due to the possibility that the 0.4 belief undershot by 1. The 0.38 is due to the following: the 80% chance that we moved 2 positions $(.4 * .8)$ and the 10% chance that we undershot $(.6*.1)$. Overshooting plays no role here because if we overshot both .4 and .6 would be past this position. **I strongly suggest working some examples until all of this is very clear, as so much of what follows depends on understanding this step.**\n",
+ "\n",
+ "If you look at the probabilities after performing the update you probably feel dismay. In the example above we started with probabilities of .4 and .6 in two fields; after performing the update the probabilities are not only lowered, but they are strewn out across the map."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGiNJREFUeJzt3X9QlWX+//EXP1IPRkwuQSAoUC6mEiknNo5Uzg6dWao1\nd0rSdi3Q1mDLVNYdl6JpS9TMHTY1oLYcZGst3Klxm2QdaNSIhWYhpDVT12LXbOCcVteQ3NAR7s8f\nfT3fTgf5sd5yH+T5mGEGrvu6zv0+74GZFzc31x1gGIYhAAAAABcs0OoCAAAAgEsF4RoAAAAwCeEa\nAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADBJv+G6trZWs2fPVkxMjAIDA1VRUdHvi+7b\nt0+33nqrQkJCFBMTo1WrVplSLAAAAODP+g3Xp06d0vXXX68NGzbIZrMpICCgz/knT57Ubbfdpqio\nKDU1NWnDhg1av369iouLTSsaAAAA8EcBg3lCY2hoqEpKSnT//fefd05ZWZkKCgrkdrs1evRoSdLq\n1atVVlamzz///MIrBgAAAPyU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aunSpKisrtWvXLn3/+9+3uhy/1N3drZ6eHqvL\nsMRPfvITffTRR/rwww/14YcfqqWlRXa7XfPnz1dLSwvB+v/p6urSgQMHRuzFi5kzZ+rgwYNeY//4\nxz/4ZV3Sli1bNGbMGM2fP9/qUixnGIYCA70jWGBg4Ij/S9g5NptNkZGROnHihKqrq3XXXXdZXdKg\nXPJXrqVv/sy/YMECpaamyuFw6IUXXvB6hPtIc+rUKR0+fFjSN3/CPHLkiFpaWvS9733P8+TNkebh\nhx/Wq6++qu3btyssLMxzP35oaKjGjh1rcXXW+PWvf60777xTMTEx6uzs1NatW/Xuu+9q586dVpdm\niXP7fX9bSEiIrrzySp8rlSPJihUrNHv2bMXGxuqLL77QqlWr9PXXX+uBBx6wujRLLF++XA6HQ2vW\nrFFWVpb27t2rTZs2jfgt1gzD0Msvv6x58+YpJCTE6nIsN2fOHD3zzDOKj4/XlClTtHfvXv3ud78b\nsT8351RXV6u7u1uTJ0/WJ598ol/96le67rrrlJOTY3Vpg2PhTiVDqrS01IiLizNGjx5t2O124733\n3rO6JMvs3r3bCAgIMAICAozAwEDP5zk5OVaXZpnv9uLcx1NPPWV1aZbJzs42Jk6caIwePdqIiIgw\nbrvtNqO6utrqsvwKW/EZxrx584zo6Ghj1KhRxvjx44177rnHOHDggNVlWWrHjh1GcnKyMWbMGCMx\nMdHYtGmT1SVZbteuXUZgYKDR2NhodSl+4auvvjJ++ctfGnFxcYbNZjMSEhKMxx9/3Dh9+rTVpVlq\n27ZtxjXXXGOMHj3aiIqKMpYsWWKcPHnS6rIGjcefAwAAACa55O+5BgAAAIYK4RoAAAAwCeEaAAAA\nMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwyf8B0J+h4dvC6WcAAAAASUVORK5C\nYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This is not a coincidence, or the result of a carefully chosen example - it is always true of the evolution (predict step). This is inevitable; if our sensor is noisy we will lose a bit of information on every prediction. Suppose we were to perform the prediction an infinite number of times - what would the result be? If we lose information on every step, we must eventually end up with no information at all, and our probabilities will be equally distributed across the `belief` array. Let's try this with 500 iterations."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGYRJREFUeJzt3X1wVOX5xvErL7xsNGagSExIJInSIBAjZEnJEsXphJ2i\nFmmBALZoApYmVQRSOjSajhUCqHTSApJolQkpFg0dHepIyiQMLzFNnBLDWkSgsWkRJ9m1UAxIDQzJ\n+f3hzx3WDXmRA2dDvp8ZZjbPeZ49995DhiuHJ+cEGYZhCAAAAMAVC7a6AAAAAOB6QbgGAAAATEK4\nBgAAAExCuAYAAABMQrgGAAAATEK4BgAAAExCuAYAAABM0m24rq6u1vTp0xUTE6Pg4GCVlZV1+6aH\nDh3SlClTFBYWppiYGK1atcqUYgEAAIBA1m24PnfunO68806tX79eNptNQUFBXc4/c+aMpk6dqqio\nKNXX12v9+vVat26dioqKTCsaAAAACERBvXlCY3h4uDZt2qSHH374snNKSkqUn58vj8ejQYMGSZJW\nr16tkpISffLJJ1deMQAAABCgTN9zXVdXp7vvvtsbrCXJ6XSqublZx48fN/t0AAAAQMAINfsN3W63\nbr31Vp+xyMhI77GRI0d6x1tbW80+PQAAAHDNRERE+Hxt+pXr7vZkAwAAANcr08P1LbfcIrfb7TPm\n8Xi8xwAAAIDrlenbQtLS0rRixQqdP3/eu++6qqpKI0aM8NkS8nVfv6Rutvr6ekmS3W6/qufpS+iJ\nP3rij574oyf+6Ik/euKPnvijJ776Sj+62trco1vxuVwu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/61goODff5ER0db\nXZalWlpa9Mgjj2j48OGy2WwaO3asqqurrS7LMnFxcX5/R4KDg/XAAw9YXZplLl68qCeffFIJCQmy\n2WxKSEjQr371K7W3t1tdmqXOnj2rpUuXKi4uTmFhYZo8ebLq6+utLqvX+kW47u0j3K93586d0513\n3qn169fLZrNx+0RJ+/fv1+OPP666ujrt2bNHoaGhysjI0OnTp60uzTKxsbF6/vnndfDgQb333nv6\n7ne/qxkzZuj999+3ujTLvfvuu3r55Zd155138v0jafTo0XK73d4/hw4dsroky3z22WeaPHmygoKC\nVFFRoaNHj+qFF17Q8OHDrS7NMu+9957P34+GhgYFBQVpzpw5VpdmmTVr1uill17Sxo0bdezYMa1f\nv17FxcVau3at1aVZ6tFHH1VVVZX+8Ic/6IMPPpDT6VRGRoaam5utLq13jH4gNTXVWLRokc/YqFGj\njPz8fIsqChw33nijUVZWZnUZAefzzz83QkJCjLffftvqUgLK0KFDjd///vdWl2Gpzz77zLjtttuM\nffv2Gffee6+xePFiq0uy1NNPP22MGzfO6jICRn5+vpGenm51GQGtsLDQGDJkiNHW1mZ1KZZ54IEH\njKysLJ+xhx9+2Pj+979vUUXW+9///meEhoYab731ls94SkqKUVBQYFFV38x1f+X6mzzCHThz5ow6\nOjo0ZMgQq0sJCO3t7Xr99dfV1tame+65x+pyLLVo0SLNnj1bU6ZMkcGvrEiSmpqaNGLECCUkJGje\nvHn617/+ZXVJltmxY4dSU1M1Z84cRUZGavz48dq0aZPVZQUMwzC0efNm/fjHP/berrc/mjZtmvbs\n2aNjx45Jkj788EPt3btX9913n8WVWefixYtqb2/3+3sxePDgPreVt9u7hfR1J0+eVHt7uyIjI33G\nhw8f7vewG+ArS5Ys0fjx45WWlmZ1KZY6dOiQ0tLSdP78edlsNm3fvl2JiYlWl2WZl19+WU1NTdq2\nbZsknkgrSZMmTVJZWZlGjx4tj8ejwsJCORwOHT58WEOHDrW6vGuuqalJxcXFysvL05NPPqmDBw96\n9+U/9thjFldnvaqqKv373//WT37yE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m6Nlnn1V8fLzG\njBmjgwcP6re//W2//b75SmVlpdrb2zV69Gh99NFH+sUvfqE77rhD2dnZVpfWOxbeqeSaKi4uNuLi\n4oxBgwYZdrvdeOedd6wuyTJ79+41goKCjKCgICM4ONj7Ojs72+rSLPP1Xnz155lnnrG6NMtkZWUZ\nI0eONAYNGmQMHz7cmDp1qlFZWWl1WQGFW/EZxty5c43o6Ghj4MCBxogRI4xZs2YZR44csbosS+3c\nudNITk42Bg8ebCQmJhobN260uiTL7dmzxwgODjYOHDhgdSkB4fPPPzd+/vOfG3FxcYbNZjMSEhKM\np556yjh//rzVpVlq+/btxm233WYMGjTIiIqKMhYvXmycOXPG6rJ6jcefAwAAACa57vdcAwAAANcK\n4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwyf8Bu/jdjfzT\nKkQAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "belief = np.array([1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n",
+ "for i in range(500):\n",
+ " predict(belief, move=1, p_correct=.8, p_under=.1, p_over=.1)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "\n",
+ "After 500 iterations we have lost all information, even though we were 100% sure that we started in position 1. Feel free to play with the numbers to see the effect of differing number of updates. For example, after 100 updates we have a small amount of information left.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "And, if you are viewing this on the web or in IPython Notebook, here is an animation of that output.\n",
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Generalizing with Convolution\n",
+ "\n",
+ "In the code above we made the assumption that the movement error is only one position. In any real problem it will almost always be possible for the error to be two, three, or more positions. \n",
+ "\n",
+ "This is easily solved with **convolution**. Convolution is the mathematical technique we use to modify one function with another function. In our case we are modifying our probability distribution with the error function that represents the probability of a movement error. In fact, the implementation of `predict()` is a convolution, though we did not call it that. Formally, convolution is defined as\n",
+ "\n",
+ "$$ (f \\ast g) (t) = \\int_0^t \\!f(\\tau) \\, g(t-\\tau) \\, \\mathrm{d}\\tau$$\n",
+ "\n",
+ "where $f\\ast g$ is the notation for convolving f by g. It does not mean multiply.\n",
+ "\n",
+ "Integrals are for continuous functions, but we are using discrete functions, so we replace the integral with a summation, and the parenthesis with array brackets.\n",
+ "\n",
+ "$$ (f \\ast g) [t] = \\sum\\limits_{\\tau=0}^t \\!f[\\tau] \\, g[t-\\tau]$$\n",
+ "\n",
+ "If you look at that equation and compare it to the `predict()` function you can see that they are doing the same thing. \n",
+ "\n",
+ "I would love to go on and on about convolution, but we have a filter to implement. Khan Academy [4] has a good mathematical introduction to convolution, and Wikipedia has some excellent animations of convolutions [5]. But the general idea is already clear to you. You slide across an array, multiplying the neighbors of the current cell with the values of a second array. This second array is called the **kernel**. In our example above we used .8 for the probability of moving to the correct location, .1 for undershooting, and .1 for overshooting. We make a kernel of this with the array `[0.1, 0.8, 0.1]`. So all we need to do is write a loop that goes over each element of our array, multiplying by the kernel, and summing the results. To emphasize that the belief is a probability distribution I have named the belief `distribution`."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def predict(distribution, offset, kernel):\n",
+ " N = len(distribution)\n",
+ " kN = len(kernel)\n",
+ " width = int((kN - 1) / 2)\n",
+ "\n",
+ " result = np.zeros(N)\n",
+ " for i in range(N):\n",
+ " for k in range (kN):\n",
+ " index = (i + (width-k) - offset) % N\n",
+ " result[i] += distribution[index] * kernel[k]\n",
+ " distribution[:] = result[:] # update belief"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We should test that this is correct:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+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V5Vhu3rx5evrppxUXF6dp06Zp\n3759+t3vfjdq/96cV1VVpa6uLk2dOlWffPKJfvWrX+naa69Vdna21aUNjIUrlQypkpISIzY21hg3\nbpxht9uN9957z+qSLLNnzx4jICDACAgIMAIDAz1fZ2dnW12aZb7di/N/nnzySatLs0xWVpYxefJk\nY9y4cUZ4eLhx6623GlVVVVaX5VdYis8wFixYYERFRRljx441Jk6caNx9993GwYMHrS7LUjt37jSS\nk5ON8ePHGwkJCcamTZusLslyu3fvNgIDA42GhgarS/ELX331lfHLX/7SiI2NNWw2mxEfH2889thj\nxpkzZ6wuzVLbt283rr76amPcuHFGZGSksWzZMuPUqVNWlzVgPP4cAAAAMMmIv+YaAAAAGCqEawAA\nAMAkhGsAAADAJIRrAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAk/wdmqQF7K+PPgwAA\nAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "belief = np.array([.05] * 10)\n",
+ "belief[4] = .55\n",
+ "predict(belief, offset=1, kernel=[.1, .8, .1])\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "All of the elements are unchanged except the middle ones, which is correct. The value in position 4 should be $0.1 * 0.05 + 0.8 * 0.05 + 0.1 * 0.55 = 0.1$, which it does. Position 5 should be $0.1 * 0.05 + 0.8 * 0.55 + 0.1 * 0.05 = 0.45$, which it does. Finally, position 6 is computed the same as position 4, and it is also correct.\n",
+ "\n",
+ "Finally, let's ensure that it shifts the positions correctly for movements greater than one."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACx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V2SZXbt2mUEBQUZQUFBRnBwsPf73Nxcq0uzzLd7cfbrySeftLo0y+Tk5BgTJ040xowZY0RG\nRhq33nqrUVNTY3VZAYWl+Axj3rx5RkxMjDF69Ghj/Pjxxt13323s37/f6rIstX37diM1NdUYO3as\nkZSUZGzYsMHqkiy3c+dOIzg42GhqarK6lIDw1VdfGb/85S+N+Ph4w2azGYmJicZjjz1mnDp1yurS\nLLV161bj6quvNsaMGWNER0cbS5YsMU6cOGF1WYPG488BAAAAk1z011wDAAAAQ4VwDQAAAJiEcA0A\nAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJjk/wATTwF7QjzFigAAAABJRU5E\nrkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "belief = np.array([.05] * 10)\n",
+ "belief[4] = .55\n",
+ "predict(belief, offset=3, kernel=[.1, .8, .1])\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The position was correctly shifted by 3 positions, so the code seems to be correct.\n",
+ "\n",
+ "It will usually be true that a small error is very likely, and a large error is very unlikely. For example, a kernel might look like\n",
+ "\n",
+ " [.02, .1, .2, .36, .2, .1, .02]\n",
+ " \n",
+ "But maybe an overshoot is very likely, and and undershoot is impossible. That kernel might be\n",
+ "\n",
+ " [.0, .0, .5, .3, .2]\n",
+ " \n",
+ "You probably will never be able to compute exact probabilities for the kernel of a real problem. It is usually enough to be approximately right. What you *must* do is ensure that the terms of the kernel sum to 1. The kernel expresses the probability of any given move, and the sum of any probability distribution must be 1.\n",
+ "\n",
+ "An easy way to do this is to make each term *proportionally* correct and then normalize it to sum to 1."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[ 0.083 0.167 0.5 0.167 0.083]\n"
+ ]
+ }
+ ],
+ "source": [
+ "kernel = np.array([1, 2, 6, 2, 1], dtype=float)\n",
+ "normalize(kernel)\n",
+ "print(kernel)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Integrating Measurements and Movement Updates"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The problem of losing information during a prediction may make it seem as if our system would quickly devolve into no knowledge. However, recall that our process is not an endless series of predictions, but of *update->predict->update->predict->update->predict->update...* The output of the update step, where we measure the current position, is fed into the prediction. The prediction step, with a degraded certainty, is then fed back into the update step where we measure the position again.\n",
+ "\n",
+ "Let's think about this intuitively. After the first update->predict round we have degraded the knowledge we gained by the measurement by a small amount. But now we take another measurement. When we try to incorporate that new measurement into our belief, do we become more certain, less certain, or equally certain? Consider a simple case - you are sitting in your office. A co-worker asks another co-worker where you are, and they report \"in his office\". You keep sitting there while they ask and answer \"has he moved\"? \"No\" \"Where is he\" \"In his office\". Eventually you get up and move, and lets say the person didn't see you move. At that time the questions will go \"Has he moved\" \"no\" (but you have!) \"Where is he\" \"In the kitchen\". Wow! At that moment the statement that you haven't moved conflicts strongly with the next measurement that you are in the kitchen. If we were modeling these with probabilities the probability that you are in your office would lower, and the probability that you are in the kitchen would go up a little bit. But now imagine the subsequent conversation: \"has he moved\" \"no\" \"where is he\" \"in the kitchen\". Pretty quickly the belief that you are in your office would fade away, and the belief that you are in the kitchen would increase to near certainty. The belief that you are in the office will never go to zero, nor will the belief that you are in the kitchen ever go to 1.0 because of the chances of error, but in practice your co-workers would be correct to be quite confident in their system.\n",
+ "\n",
+ "That is what intuition tells us. What does the math tell us?\n",
+ "\n",
+ "Well, we have already programmed the update step, and we have programmed the predict step. All we need to do is feed the result of one into the other, and we will have programmed our dog tracker!!! Let's see how it performs. We will input measurements as if the dog started at position 0 and moved right at each update. However, as in a real world application, we will start with no knowledge and assign equal probability to all positions. "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbVJREFUeJzt3X9QVXX+x/EXP1IvRUwuQiAkYC6mEik3Nq6UzQ7dWcs1\nd03Sdi3Q1oUtU1l3XIqdNkWt3GFXTdAtB9laC3dq3CZZBxo1YqFZCW9rpi4tu2YD97a6huaGjnC+\nf/TtTreL/Mgj5yLPxwwzl8/5fO553/fo3BeXD+cEGYZhCAAAAMAlC7a6AAAAAOBKQbgGAAAATEK4\nBgAAAExCuAYAAABMQrgGAAAATEK4BgAAAExCuAYAAABM0mu4rq2t1cyZMxUXF6fg4GBVVFT0+qQH\nDx7UtGnTFBYWpri4OK1atcqUYgEAAIBA1mu4Pnv2rG6++WatX79eNptNQUFBPc4/ffq07rrrLsXE\nxKixsVHr16/XunXrVFJSYlrRAAAAQCAK6s8dGsPDw7Vp0yY9+OCDF51TVlamwsJCeTweDR8+XJK0\nevVqlZWV6eOPP770igEAAIAAZfqe64aGBt1+++3eYC1JTqdTra2tOnbsmNmnAwAAAAJGqNlP6Ha7\ndcMNN/iMRUdHe4+NGTPGO97e3m726QEAAIABExER4fO96Z9c97YnGwAAALhSmR6ur7/+erndbp8x\nj8fjPQYAAABcqUzfFpKRkaEVK1bo3Llz3n3XNTU1Gj16tM+WkK/7+kfqZmtsbJQk2e32y3qewYSe\n+KMn/uiJP3rij574oyf+6Ik/euJrsPSjp63NfboUn8vlksvlUldXl44dOyaXy6Xjx49LkgoLC5WV\nleWd/8ADDygsLEw5OTk6dOiQXnvtNT3zzDMqKCgw4aUAAAAAgavXcL1//35NmTJFU6ZMUUdHh558\n8klNmTJFTz75pKQv/kixpaXFO//aa69VTU2NWltbZbfbtXjxYi1fvlzLli27fK8CAAAACAC9bgu5\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WSAVVaWmokJCQYw4cPN+x2\nu/H2229bXZJl9u7dawQFBRlBQUFGcHCw93Fubq7VpVnm67348uupp56yujTL5OTkGGPGjDGGDx9u\nREVFGXfddZdRXV1tdVkBhUvxGcbcuXON2NhYY9iwYcbo0aON++67zzh8+LDVZVlq165dRmpqqjFi\nxAgjOTnZ2Lhxo9UlWW7Pnj1GcHCwsX//fqtLCQifffaZ8fOf/9xISEgwbDabkZSUZDzxxBPGuXPn\nrC7NUjt27DDGjh1rDB8+3IiJiTEWL15snD592uqy+o3bnwMAAAAmueL3XAMAAAADhXANAAAAmIRw\nDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmOT/AB5FzmwxXQsBAAAAAElF\nTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hallway = np.array([1, 1, 0, 0, 0, 0, 0, 0, 1, 0])\n",
+ "belief = np.array([.1] * 10)\n",
+ "update(hallway, belief, z=1, prob_correct=.75)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGYNJREFUeJzt3X9UlvX9x/EXYOpNISdnEAgJlMNUIuWOxS1lZ4fuM8uZ\nW0naZoE2BytTmTuOYsepqJU7bGqCzjzIahbu1HGdZB7oqBGDziS8m5k6GpvZgftuOkNzoUe4vn/0\n9T7d3ciPvPC6gefjHM+5+VyfD9f7fh/FFxcXnyvIMAxDAAAAAK5YsNUFAAAAAAMF4RoAAAAwCeEa\nAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADBJt+G6urpaM2bMUExMjIKDg1VWVtbtJz10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/0AcffKD3339f77//vlwul+x2u+bMmSOXy0Ww/n9tbW06cuTIoL14\nMWXKFB09etRn7B//+AffrEvavn27hg8frjlz5lhdiuUMw1BwsG8ECw4OHvQ/CbvEZrMpMjJSp0+f\nVmVlpR544AGrS+qVAX/lWvryx/xz585VamqqHA6HNm/e7PMI98Hm3LlzamxslPTljzCPHz8ul8ul\nb33rW94nbw42TzzxhF5++WXt2rVL4eHh3vvxw8LCdO2111pcnTV++ctfavr06YqJidHZs2e1Y8cO\nvf3229qzZ4/VpVni0n7fXxUaGqrrr7/e70rlYLJ06VLNmDFDsbGx+vTTT7Vq1Sp98cUXeuyxx6wu\nzRJLliyRw+HQmjVrlJmZqYMHD2rjxo2Dfos1wzD04osvavbs2QoNDbW6HMvNnDlTzz77rOLj4zV+\n/HgdPHhQv/3tbwftv5tLKisr1d7ernHjxumjjz7SL37xC916663Kzs62urTesXCnkququLjYiIuL\nM4YNG2bY7XbjnXfesboky+zbt88ICgoygoKCjODgYO/r7Oxsq0uzzNd7cenPihUrrC7NMllZWcaY\nMWOMYcOGGREREca9995rVFZWWl1WQGErPsOYPXu2ER0dbQwdOtQYPXq08dBDDxlHjhyxuixL7d69\n20hOTjaGDx9uJCYmGhs3brS6JMvt3bvXCA4ONg4cOGB1KQHh888/N37+858bcXFxhs1mMxISEoxn\nnnnGOH/+vNWlWWrnzp3GzTffbAwbNsyIiooyFi5caJw5c8bqsnqNx58DAAAAJhnw91wDAAAAVwvh\nGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADAJ4RoAAAAwCeEaAAAAMAnhGgAAADDJ/wEaW9oMMTIY\nIwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "kernel = (.1, .8, .1)\n",
+ "predict(belief, 1, kernel)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "So after the first update we have assigned a high probability to each door position, and a low probability to each wall position. The predict step shifted these probabilities to the right, smearing them about a bit. Now let's look at what happens at the next sense."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGhpJREFUeJzt3X9QVXX+x/EXYOrFiMklCIQEysVUIuXGxpXK2aE7S7Xm\nTknargXaGmyZyrrjUjRtiVq5w6YG1JaDbK2FOzVuk6wDjRqx0CyEtzVT15Zds4F7W11Dc0NHON8/\n+nqn20V+5IFzkedjxhn4nM+5533fgzOve/jwOUGGYRgCAAAAcMGCrS4AAAAAuFgQrgEAAACTEK4B\nAAAAkxCuAQAAAJMQrgEAAACTEK4BAAAAkxCuAQAAAJP0Ga7r6uo0e/ZsxcbGKjg4WJWVlX2+6N69\ne3XLLbcoNDRUsbGxWrVqlSnFAgAAAIGsz3B96tQpXXfddVq/fr1sNpuCgoJ6nX/ixAndeuutio6O\nVnNzs9avX69169appKTEtKIBAACAQBQ0kCc0hoWFqbS0VPfdd99555SXl6uwsFAej0djxoyRJK1e\nvVrl5eX67LPPLrxiAAAAIECZvua6sbFRN910kzdYS5LT6VRbW5sOHz5s9uUAAACAgDHK7Bd0u926\n6qqrfMaioqK8xyZOnOgd7+joMPvyAAAAwJAJDw/3+d70O9d9rckGAAAALlamh+srr7xSbrfbZ8zj\n8XiPAQAAABcr05eFpKena+XKlTp9+rR33XVtba0mTJjgsyTk2759S91szc3NkiS73T6o1xlO6Ik/\neuKPnvijJ/7oiT964o+e+KMnvoZLP3pb2tyvrfhcLpdcLpe6u7t1+PBhuVwuHTlyRJJUWFiozMxM\n7/x7771XoaGhysnJ0b59+/Tmm2/qmWeeUUFBgQlvBQAAAAhcfYbrpqYmzZgxQzNmzFBnZ6eeeOI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Lr/8cr87lSPJihUrNHv2bMXFxenzzz/XqlWr9NVXX+n++++3ujRLLF++XA6HQ2vWrFF2drb27Nmj\njRs3jvgt1gzD0Msvv6x58+YpNDTU6nIsN2fOHD399NNKSEjQlClTtGfPHv3ud78bsf9vzqmpqVFX\nV5cmT56sTz75RL/61a907bXXKjc31+rSBsbCnUqGVFlZmREfH2+MGTPGsNvtxnvvvWd1SZbZtWuX\nERQUZAQFBRnBwcHer3Nzc60uzTLf7sW5f08++aTVpVkmJyfHmDhxojFmzBgjMjLSuPXWW42amhqr\nywoobMVnGPPmzTNiYmKM0aNHGxMmTDDuvvtuY//+/VaXZant27cbKSkpxtixY42kpCRj48aNVpdk\nuZ07dxrBwcFGU1OT1aUEhC+//NL45S9/acTHxxs2m81ITEw0HnvsMeP06dNWl2aprVu3GldffbUx\nZswYIzo62liyZIlx4sQJq8saMB5/DgAAAJjkol9zDQAAAAwVwjUAAABgEsI1AAAAYBLCNQAAAGAS\nwjUAAABgEsI1AAAAYBLCNQAAAGASwjUAAABgkv8DFNj1vPFDz+sAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "update(hallway, belief, z=1, prob_correct=.75)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Notice the tall bar at position 1. This corresponds with the (correct) case of starting at position 0, sensing a door, shifting 1 to the right, and sensing another door. No other positions make this set of observations as likely. Now lets add an update and then sense the wall."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGgJJREFUeJzt3X9QlWX+//EXP1IPRUwuQSAoYK6mEikn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Pc\nc889xsGDB60uy1I7d+40UlJSjFGjRhkTJ040Nm7caHVJltu9e7cRHBxsNDQ0WF1KQPjyyy+Nn//8\n50ZCQoJhs9mMpKQk4/HHHzfOnj1rdWmW2r59uzF+/Hhj5MiRRkxMjLFkyRLj1KlTVpfVZzz+HAAA\nADDJkF9zDQAAAAwUwjUAAABgEsI1AAAAYBLCNQAAAGASwjUAAABgEsI1AAAAYBLCNQAAAGASwjUA\nAABgkv8DtE/5kVUp0eEAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "predict(belief, 1, kernel)\n",
+ "update(hallway, belief, z=0, prob_correct=.75)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This is exciting! We have a very prominent bar at position 2 with a value of around 35%. It is over twice the value of any other bar in the plot, and is about 4% larger than our last plot, where the tallest bar was around 31%. Let's see one more sense->update cycle."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGihJREFUeJzt3X9QlWX+//EXYOrBiMklCAQFytVUIuXExpHK2aEzS7nm\nTknargXaGmyZyrrrUjRtipq5w6YG1JaDbK2FOzVuk6wDjRqx0CyEpzVT15Zds4FzWl1Dc0NHuD9/\n9PV8Ox3kx3rLfZDnY8YZuO7r5n6f98DM69xe57qDDMMwBAAAAOCiBVtdAAAAAHC5IFwDAAAAJiFc\nAwAAACYhXAMAAAAmIVwDAAAAJiFcAwAAACYhXAMAAAAm6TVc19bWatasWYqNjVVwcLAqKip6/aH7\n9u3T7bffrtDQUMXGxmrVqlWmFAsAAAAEsl7D9enTp3XjjT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QAAAABJ\nRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "predict(belief, 1, kernel)\n",
+ "update(hallway, belief, z=0, prob_correct=.75)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Here things have degraded a bit due to the long string of wall positions in the map. We cannot be as sure where we are when there is an undifferentiated line of wall positions, so naturally our probabilities spread out a bit.\n",
+ "\n",
+ "I spread the computation across several cells, iteratively calling `predict()` and `update()`. This chart from the **g-h Filter** chapter illustrates the algorithm."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAFoCAYAAAAhN0NQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlcE3f+P/DX5CJcCeESEORSQQW0KOKtWNTWE126tdtu\nq631aO2xtrXXtlp7bOv23G7V1bZadf21q1VEt62KAmI9EBUVFVEQBZT7Jgkhyfz+8MusMQEBCZPj\n/Xw8eDyYTyYz7wkfMu/5zOfzGYZlWRaEEEIIsSsCvgMghBBCSM+jBIAQQgixQ5QAEEIIIXbIrAnA\nvHnzIBB0fBcrV66EQCDAjRs3urS/tLQ0CAQC/PDDD116PyGEEGIv2j07t55QP/vssy5tnGEYMAxj\nUJaUlIT33nuvw+t3db+EEEIIaVuHLs+7ekLdsGEDVCqVQVl7CcBf//pXqFQq9OnTp0v7I4QQQkjH\niMy6cZHpzbeVUAiFQgiFQnOGRAghhBB0sg9AYWEhBAIB3nvvPezduxcxMTFwdHSEn58fli9fDp1O\nZ7D+3X0AJkyYgM2bN4NlWQgEAu5n8+bNAEz3Abh58yZeeeUVDBkyBO7u7nB0dMSgQYOwevVq6PX6\n+zl2QgghxG51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JjgNWiJpqhVq1ahq6sLly5deuzPKhQKxMfHo62t\nDffu3Rt0+eTk5GTodDr8/e9/H2u4REQDcAwA0Sjt27fP+lKg0UhPT0d3dzd2795tt/yjjz5CeXk5\nfve7340lTCIiu9gDQOQACoUCf/vb39DW1oaf/OQnuHHjBmJiYhwdFhHJCHsAiCbZSy+9BEmSsH//\nfuj1ehiNRqxevRpnzpxxdGhEJCPsASAiIpIh9gAQERHJEBMAIiIiGWICQEREJENMAIiIiGSICQAR\nEZEMMQEgIiKSISYAREREMsQEgIiISIaYABAREcnQ/wBVACHr/w9L3AAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import gh_internal\n",
+ "gh_internal.create_predict_update_chart()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This filter is a form of the g-h filter. Here we are using the percentages for the errors to implicitly compute the *g* and *h* parameters. We could express the discrete Bayes algorithm as a g-h filter, but that would obscure the logic of this filter.\n",
+ "\n",
+ "We can express this in pseudocode.\n",
+ "\n",
+ "**Initialization**\n",
+ "\n",
+ " 1. Initialize our belief in the state\n",
+ " \n",
+ "**Predict**\n",
+ "\n",
+ " 1. Based on the system behavior, predict state at the next time step\n",
+ " 2. Adjust belief to account for the uncertainty in prediction\n",
+ " \n",
+ "**Update**\n",
+ "\n",
+ " 1. Get a measurement and associated belief about its accuracy\n",
+ " 2. Compute residual between estimated state and measurement\n",
+ " 3. Determine whether whether the measurement matches each state\n",
+ " 4. Update state belief if it matches the measurement\n",
+ "\n",
+ "When we cover the Kalman filter we will use this exact same algorithm; only the details of the computation will differ. "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Finally, for those viewing this in a Notebook or on the web, here is an animation of that algorithm.\n",
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## The Effect of Bad Sensor Data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "You may be suspicious of the results above because I always passed correct sensor data into the functions. However, we are claiming that this code implements a *filter* - it should filter out bad sensor measurements. Does it do that?\n",
+ "\n",
+ "To make this easy to program and visualize I will change the layout of the hallway to mostly alternating doors and hallways, and run the algorithm on 5 correct measurements:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGexJREFUeJzt3X9QlWX+//EXP/xxKGJyCQJBgXIxlUg5sXKkdHbozFqt\nuaOStmuBti5smcq661LstCVq5Q67akJtOcjWWrhT4zbJOtCoEQvNSnhaM3Vt2TUbOKfVNTQ3dIT7\n80dfz7fTQX7kLfcBno8ZZ+C6r/vc7/MevHlxc3HfQYZhGAIAAABw2YKtLgAAAAAYLAjXAAAAgEkI\n1wAAAIBJCNcAAACASQjXAAAAgEkI1wAAAIBJCNcAAACASXoM17W1tZo1a5bi4uIUHBysioqKHl/0\nwIEDmj59usLCwhQXF6fVq1ebUiwAAAAQyHoM12fPntXNN9+sDRs2yGazKSgoqNv5p0+f1h133KGY\nmBg1NjZqw4YNWr9+vUpKSkwrGgAAAAhEQX15QmN4eLg2b96s+++//5JzysrKVFhYKI/HoxEjRkiS\n1qxZo7KyMn3yySeXXzEAAAAQoExfc93Q0KDbbrvNG6wlyel0qqWlRceOHTP7cAAAAEDACDX7Bd1u\nt8aMGeMzFh0d7d02duxY73hbW5vZhwcAAAD6TUREhM/npl+57mlNNgAAADBYmR6ur7/+erndbp8x\nj8fj3QYAAAAMVqYvC8nIyNCqVat07tw577rrmpoajR492mdJyNd9/ZK62RobGyVJdrv9ih5nIKEn\n/uiJP3rij574oyf+6Ik/euKPnvgaKP3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z5oy2bdumt99+W7t27bK6\nNEtcvN/3V4WFhenaa6/1u1I5lKxcuVKzZs1SfHy8Pv30U61evVpffPGFHnjgAatLs8SKFSvkcDi0\ndu1aZWdna//+/dq0adOQv8WaYRh68cUXNX/+fIWFhVldjuVmz56tp556SomJiZowYYL279+v3/72\nt0P2/81F1dXV6ujo0Pjx4/XRRx/p5z//uW666Sbl5uZaXVrfWHinkn5VWlpqJCQkGCNGjDDsdrvx\nzjvvWF2SZfbs2WMEBQUZQUFBRnBwsPfj3Nxcq0uzzNd7cfHfE088YXVplsnJyTHGjh1rjBgxwoiK\nijLuuOMOo7q62uqyAgq34jOM+fPnG7Gxscbw4cON0aNHG3PnzjUOHTpkdVmW2rlzp5GammqMHDnS\nSE5ONjZt2mR1SZbbvXu3ERwcbOzbt8/qUgLC559/bvzsZz8zEhISDJvNZiQlJRmPPfaYce7cOatL\ns9T27duNG264wRgxYoQRExNjLF261Dh9+rTVZfUZjz8HAAAATDLo11wDAAAA/YVwDQAAAJiEcA0A\nAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJjk/wBJZuviwMKeXwAAAABJRU5E\nrkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hallway = [1, 0, 1, 0, 0, 1, 0, 1, 0, 0]\n",
+ "kernel = (.1, .8, .1)\n",
+ "belief = np.array([.1] * 10)\n",
+ "measurements = [1, 0, 1, 0, 0]\n",
+ "\n",
+ "for m in measurements:\n",
+ " update(hallway, belief, z=m, prob_correct=.75)\n",
+ " predict(belief, 1, kernel)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "At this point we have correctly identified the likely cases, we either started at position 0 or 5, because we saw the following sequence of doors and walls 1,0,1,0,0. But now lets inject a bad measurement, and see what happens:\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGbBJREFUeJzt3X9QVXX+x/EXYOqliMk1CIQEzMVUIuXGxpXK2aE7a7Xm\nbknargXaGmyZyrrjUjRtilq5w6Ym2JaDbK2FOzVuk6wDjRqx0CyEtzVTl5Zds4F7W11Dc0NHOPtH\n3+6320V+5IFzgedjxpnL53zOPe/7Hr3z4vi5nxtkGIYhAAAAABct2OoCAAAAgKGCcA0AAACYhHAN\nAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJikx3BdXV2t2bNnKyYmRsHBwSorK+vxSQ8c\nOKBbbrlFoaGhiomJ0erVq00pFgAAAAhkPYbrM2fO6LrrrtOGDRtks9kUFBTU7fxTp07p1ltvVVRU\nlBoaGrRhwwatX79eRUVFphUNAAAABKKgvnxDY1hYmDZv3qz77rvvgnNKSkqUn58vj8ejUaNGSZLW\nrFmjkpISffLJJxdfMQAAABCgTF9zXVdXp5tuuskbrCXJ6XSqpaVFR48eNftyAAAAQMAYYfYTut1u\nXX311T5jkZGR3mPjx4/3jre1tZl9eQAAAGDAhIeH+/xs+p3rntZkAwAAAEOV6eH6qquuktvt9hnz\neDzeYwAAAMBQZfqykLS0NK1cuVJnz571rruuqqrSuHHjfJaEfNM3b6mbraGhQZJkt9v79TqDCT3x\nR0/80RN/9MQfPfFHT/zRE3/0xNdg6Ud3S5t7tRWfy+WSy+VSZ2enjh49KpfLpWPHjkmS8vPzlZGR\n4Z1/7733KjQ0VFlZWTp48KBef/11Pf3008rLyzPhpQAAAACBq8dwXV9fr+nTp2v69Olqb2/XE088\noenTp+uJJ56Q9OWHFJubm73zL7/8clVVVamlpUV2u11LlizRihUrtHz58v57FQAAAEAA6HFZyMyZ\nM9XZ2XnB46WlpX5jU6dO1dtvv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bKtLs8w3e/HVnyeffNLq0iyTlZVljB8/3hg1apQRERFh\n3HrrrUZlZaXVZQUUtuIzjHnz5hnR0dHGyJEjjXHjxhl33323cejQIavLstSuXbuM5ORkY/To0UZi\nYqKxadMmq0uy3J49e4zg4GCjvr7e6lICwueff2784he/MOLi4gybzWYkJCQYjz32mHH27FmrS7PU\njh07jAkTJhijRo0yoqKijCVLlhinTp2yuqw+4+vPAQAAAJMM+TXXAAAAwEAhXAMAAAAmIVwDAAAA\nJiFcAwAAACYhXAMAAAAmIVwDAAAAJiFcAwAAACYhXAMAAAAm+R/XX+G7EZwefAAAAABJRU5ErkJg\ngg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "update(hallway, belief, z=m, prob_correct=.75)\n",
+ "predict(belief, 1, kernel)\n",
+ "bp.bar_plot(belief)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "That one bad measurement appears to have significantly eroded our knowledge. However, note that our highest probabilities are still at 0 and 5, which is correct. Now let's continue with a series of correct measurements"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAAF9CAYAAADP4URIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XtUVPXeP/D3DHe5KelwUY6Amh7TSBxvgEiF48HMPF5Q\nO/bEZJmYJppPRUdFifRk57DyBl4fNE8WHDuPVpKCoSJpBSHeMRIfNWE4QYphC/kJ398fLmY5ggzI\nnr3Beb/WYgXf2d/5fGcY333Ys2dvlRBCgIiIiIiI2kyt9AKIiIiIiB4WbK6JiIiIiCTC5pqIiIiI\nSCJsromIiIiIJMLmmoiIiIhIImyuiYiIiIgkwuaaiIiIiEgibK6pwwgPD4darcbly5cVW8P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88az4V6r4ULF2Lv3r34+9//joEDB6KqqgplZWWSL56IiB4c852ISHpmm+uk\npCTo9XrMnDkTALBmzRrs27cPKSkpWLFiRaPtz58/j3Xr1uHUqVPo27evcTwwMFDCZRMRUVsx34mI\npNfsYSG1tbUoKCiATqczGdfpdDh69GiTc/bs2YOAgABkZGQgICAA/v7+iI6Oxi+//CLdqomIqE2Y\n70REltFsc11RUYG6ujp4enqajGs0GhgMhibnlJSU4NKlS0hPT8dHH32EHTt2oKioCM8++yyEENKt\nnIiIHhjznYjIMlp0+fPWqK+vx61bt7Bjxw707t0bALBjxw707dsX+fn5GDJkSJPz8vPzW1yjNdta\ngpL1rbW20vVZ2/rqS1G7T58+Eqyk/XjY852vd+urrXR9a62tdH1L53uze667du0KGxsblJeXm4yX\nl5fD29u7yTne3t6wtbU1Bi8A9O7dGzY2Nrh8+XJr1k1ERBbCfCcisoxm91zb29tj8ODByMzMxKRJ\nk4zjWVlZmDJlSpNzQkNDcfv2bZSUlCAgIADAnbcS6+rq0LNnz/vW0mq1Zhfb8JdGS7a1BCXrW2tt\npeuzNn/nbVFVVdXm+7AU5nv7qK10fWutrXR9a62tdH258t3sea4XLlyIbdu2YevWrTh37hzmz58P\ng8GA2bNnAwDi4uIQERFh3D4iIgJBQUF46aWXUFhYiOPHj+Oll17C8OHDFftFEhFRY8x3IiLpmT3m\nOioqCpWVlUhMTERZWRkGDhyIjIwM4zlQDQYDSkpKjNurVCp8+eWXeP311xEWFgYnJyfodDokJSVZ\n7lEQEVGrMd+JiKTXog80xsTEICYmpsnbUlNTG415eXkhPT29bSsjIiKLY74TEUmrRZc/JyIiIiIi\n89hcExERERFJhM01EREREZFE2FwTEREREUmEzTURERERkUTYXBMRERERSaRFzXVycjL8/f3h5OQE\nrVaL3NzcFt15cXExXF1d4erq2qZFEhGRZTDfiYikZba5TktLQ2xsLBYvXozCwkIEBwcjMjISV65c\naXZebW0tpk2bhlGjRkGlUkm2YCIikgbznYhIemab66SkJOj1esycORN9+/bF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xAWVkZ+vTpg8zMTISGhgIAzGYzSkpKLP1jYmKQkZGBv/71r3j7\n7bfRrl07DB48GLt374anp6d6r4SIiJqE+U5EpDybi2sASEhIQEJCQoOPbdy4sV7bhAkTMGHChObN\njIiIVMd8JyJSll23PyciIiIiItu4uCYiIiIiUggX10RERERECuHimoiIiIhIIVxcExEREREphItr\nIiIiIiKF2LW4TktLQ0REBDw9PWE0GpGbm2tzzDvvvINevXrBw8MDwcHBSE5ObvZkiYhIWcx3IiJl\n2bzOdUZGBhITE5Geno6YmBisW7cOcXFxOHXqlOVGA7dLSkrCrl278Le//Q19+vRBZWUlysrKFJ88\nERHdPeY7EZHybC6uU1JSEB8fjxkzZgAAUlNTsXv3bqSnp2PlypX1+p8+fRpr167F8ePH0bNnT0t7\nVFSUgtMmIqLmYr4TESmv0cNCqqurUVBQgNjYWKv22NhYHDx4sMExn3/+OSIjI5GZmYnIyEhERERg\n+vTp+OWXX5SbNRERNQvznYhIHQYRkTs9WFpaiq5du2L//v2IiYmxtC9btgxbt25FcXFxvTGzZs3C\n5s2bcf/992P16tUAgIULFwIADh06BIPBYOlbWVlp+f7MmTPNfzVERC1Ijx49LN/7+PjoOJP6mO9E\nRHevsXy3eVhIU9XW1uL69evYsmULunfvDgDYsmULevbsifz8fPTv31/pkkREpAHmOxGRbY0urv38\n/ODs7Izy8nKr9vLycgQFBTU4JigoCC4uLpbgBYDu3bvD2dkZP/300x3D12g02pxsfn6+3X3VoGd9\nR62td33W5u+8OW7de9vSMN9bRm296ztqbb3rO2ptvetrle+NHnPt5uaGfv36ISsry6o9OzsbJpOp\nwTExMTG4ceMGSkpKLG0lJSWoqalBWFhYU+ZNREQqYb4TEanD5nWuk5KSsGnTJmzYsAFFRUV48cUX\nYTabMWvWLABAcnIyRo0aZek/atQoREdH45lnnkFhYSGOHDmCZ555BoMGDdLtryQiIqqP+U5EpDyb\nx1xPmjQJFRUVWLFiBcrKytCnTx9kZmZaroFqNput9mIYDAbs3LkTL7zwAoYNGw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barsmRXga3b9Krp6tWrcuTIETly5Ii0a9dOli1bJkeOHNGk9uzZs6VDhw6Sk5MjZWVl\nlq+rV6+qXvvll1+WAwcOyNmzZ+XYsWPyyiuviJOTk2RlZaleuyFafmy4YMEC2bdvn5SUlMg333wj\no0ePFh8fH01+53l5eeLq6ipvvvmmnDlzRrZt2yY+Pj6Slpamem0RkdraWunRo0e9qzeo7bnnnpOu\nXbvKrl275OzZs/Lvf/9bunTpIgsXLtRsDl988YVkZmZKSUmJZGVlSVRUlAwePNhyXCipQ698d9Rs\nF3HcfNcz20WY73rlu9bZ3moW1yIiaWlpEh4eLu7u7mI0Gusdo6eWvXv3isFgsHxsVfd9fHy86rVv\nr1n3tXTpUtVrT58+XcLCwsTd3V38/f3l4Ycf1i14RbQ9oXHKlCkSHBwsbm5uEhISIhMmTJCioiJN\naouI7Nq1S6KiosTDw0N69uwpa9as0ax2Tk6OODk5aXLs5a2uXr0qCxYskPDwcPH09JTIyEh59dVX\n5fr165rNYdu2bdKtWzdxd3eXoKAgmTdvnly5ckWz+o5Mj3x31GwXcdx81zvbRZjveuS71tnO258T\nERERESmkVRxzTURERETUGnBxTURERESkEC6uiYiIiIgUwsU1EREREZFCuLgmIiIiIlIIF9dERERE\nRArh4pqIiIiISCFcXBMRERERKYSLayIiIiIihfx/3pDuDjpTJXEAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "with figsize(y=5.5):\n",
+ " measurements = [0, 1, 0, 1, 0, 0]\n",
+ "\n",
+ " for i, m in enumerate(measurements):\n",
+ " update(hallway, belief, z=m, prob_correct=.75)\n",
+ " predict(belief, 1, kernel)\n",
+ " plt.subplot(3, 2, i+1)\n",
+ " bp.bar_plot(belief, title='step{}'.format(i+1))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "As you can see we quickly filtered out the bad sensor reading and converged on the most likely positions for our dog."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Drawbacks and Limitations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Do not be mislead by the simplicity of the examples I chose. This is a robust and complete implementation of a histogram filter, and you may use the code in real world solutions. If you need a multimodal, discrete filter, this filter works.\n",
+ "\n",
+ "With that said, while this filter is used in industry, it is not used often because it has several limitations. Getting around those limitations is the motivation behind the chapters in the rest of this book.\n",
+ "\n",
+ "The first problem is scaling. Our dog tracking problem used only one variable, $pos$, to denote the dog's position. Most interesting problems will want to track several things in a large space. Realistically, at a minimum we would want to track our dogs $(x,y)$ coordinate, and probably his velocity $(\\dot{x},\\dot{y})$ as well. We have not covered the multidimensional case, but instead of a histogram we use a multidimensional grid to store the probabilities at each discrete location. Each `update()` and `predict()` step requires updating all values in the grid, so a simple four variable problem would require $O(n^4)$ running time *per time step*. Realistic filters can have 10 or more variables to track, leading to exorbitant computation requirements.\n",
+ "\n",
+ "The second problem is that the histogram is discrete, but we live in a continuous world. The histogram requires that you model the output of your filter as a set of discrete points. In our dog in the hallway example, we used 10 positions, which is obviously far too few positions for anything but a toy problem. For example, for a 100 meter hallway you would need 10,000 positions to model the hallway to 1cm accuracy. So each update and predict operation would entail performing calculations for 10,000 different probabilities. It gets exponentially worse as we add dimensions. If our dog was roaming in a $100x100 m^2$ courtyard, we would need 100,000,000 bins ($10,000^2$) to get 1cm accuracy.\n",
+ "\n",
+ "A third problem is that the histogram is multimodal. This is not always a problem - an entire class of filters, the particle filters, are multimodal and are often used because of this property. But imagine if the GPS in your car reported to you that it is 40% sure that you are on D street, but 30% sure you are on Willow Avenue. I doubt that you would find that useful. Also, GPSs report their error - they might report that you are at $(109.878W, 38.326N)$ with an error of $9m$. There is no clear mathematical way to extract error information from a histogram. Heuristics suggest themselves to be sure, but there is no exact determination. You may or may not care about that while driving, but you surely do care if you are trying to send a rocket to Mars or track and hit an oncoming missile.\n",
+ "\n",
+ "This difficulty is related to the fact that the filter often does not represent what is physically occurring in the world. Consider this distribution for our dog:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAACeCAYAAAD5RibQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGexJREFUeJzt3X9QlWX+//EXP/xxKGJyCQJBgXIxlUg5sXKkdHbozFqt\nuaOStmuBti5smcq661LstCVq5Q67akJtOcjWWrhT4zbJOtCoEQvNSnhaM3Vt2TUbOKfVNTQ3dIT7\n80dfz7fTQX7kLfcBno8ZZ+C6r/vc7/MevHlxc3HfQYZhGAIAAABw2YKtLgAAAAAYLAjXAAAAgEkI\n1wAAAIBJCNcAAACASQjXAAAAgEkI1wAAAIBJCNcAAACASXoM17W1tZo1a5bi4uIUHBysioqKHl/0\nwIEDmj59usLCwhQXF6fVq1ebUiwAAAAQyHoM12fPntXNN9+sDRs2yGazKSgoqNv5p0+f1h133KGY\nmBg1NjZqw4YNWr9+vUpKSkwrGgAAAAhEQX15QmN4eLg2b96s+++//5JzysrKVFhYKI/HoxEjRkiS\n1qxZo7KyMn3yySeXXzEAAAAQoExfc93Q0KDbbrvNG6wlyel0qqWlRceOHTP7cAAAAEDACDX7Bd1u\nt8aMGeMzFh0d7d02duxY73hbW5vZhwcAAAD6TUREhM/npl+57mlNNgAAADBYmR6ur7/+erndbp8x\nj8fj3QYAAAAMVqYvC8nIyNCqVat07tw577rrmpoajR492mdJyNd9/ZK62RobGyVJdrv9ih5nIKEn\n/uiJP3rij574oyf+6Ik/euKPnvgaKP3obmlzr27F53K55HK51NnZqWPHjsnlcun48eOSpMLCQmVl\nZXnn33fffQoLC1NOTo4OHjyo119/XU8//bQKCgpMeCsAAABA4OoxXO/bt09TpkzRlClT1N7erscf\nf1xTpkzR448/LunLP1Jsbm72zr/mmmtUU1Oj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SomJiZowYYL279+v3/72\nt0P2/81F1dXV6ujo0Pjx4/XRRx/p5z//uW666Sbl5uZaXVrfWHinkn5VWlpqJCQkGCNGjDDsdrvx\nzjvvWF2SZfbs2WMEBQUZQUFBRnBwsPfj3Nxcq0uzzNd7cfHfE088YXVplsnJyTHGjh1rjBgxwoiK\nijLuuOMOo7q62uqyAgq34jOM+fPnG7Gxscbw4cON0aNHG3PnzjUOHTpkdVmW2rlzp5GammqMHDnS\nSE5ONjZt2mR1SZbbvXu3ERwcbOzbt8/qUgLC559/bvzsZz8zEhISDJvNZiQlJRmPPfaYce7cOatL\ns9T27duNG264wRgxYoQRExNjLF261Dh9+rTVZfUZjz8HAAAATDLo11wDAAAA/YVwDQAAAJiEcA0A\nAACYhHANAAAAmIRwDQAAAJiEcA0AAACYhHANAAAAmIRwDQAAAJjk/wBJZuviwMKeXwAAAABJRU5E\nrkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "belief = [0.2245871, 0.06288015, 0.06109133, \n",
+ " 0.0581008, 0.09334062, 0.2245871,\n",
+ " 0.06288015, 0.06109133, 0.0581008, 0.09334062]\n",
+ "bp.bar_plot(belief) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " The largest probabilities are in position 0 and position 5. This does not fit our physical intuition at all. A dog cannot be in two places at once (my dog Simon certainly tries - his food bowl and my lap often have equal allure to him). We would have to use heuristics to decide how to interpret this distribution, and there is usually no satisfactory answer. This is not always a weakness - a considerable amount of literature has been written on **Multi-Hypothesis Tracking (MHT)**. We cannot always distill our knowledge to one conclusion, and MHT uses various techniques to maintain multiple story lines at once, using backtracking schemes to go *back in time* to correct hypothesis once more information is known. This will be the subject of later chapters. In other cases we truly have a multimodal situation - we may be optically tracking pedestrians on the street and need to represent all of their positions. \n",
+ " \n",
+ "In practice it is the exponential increase in computation time that leads to the discrete Bayes filter being the least frequently used of all filters in this book. Many problems are best formulated as discrete or multimodal, but we have other filter choices with better performance. With that said, if I had a small problem that this technique could handle I would choose to use it; it is trivial to implement, debug, and understand, all virtues."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Tracking and Control\n",
+ "\n",
+ "So far we have been tracking an object which is moving independently. But consider this very similar problem. I am automating a warehouse and want to use robots to collect all of the items for a customer's order. Perhaps the easiest way to do this is to have the robots travel on a train track. I want to be able to send the robot a destination and have it go correctly to that point. But train tracks and robot motors are imperfect. Wheel slippage and imperfect motors means that the robot is unlikely to travel to exactly the position you command. \n",
+ "\n",
+ "So, we add sensors. We can add some sort of device to help the robot determine it's position. Perhaps we mount magnets on the track every few feet, and use a Hall sensor to count how many magnets are passed. If we have counted 10 magnets then the robot should be at the 10th magnet. Of course it is possible to either miss a magnet or to count it twice, so we have to accommodate some degree of error. In any case, is should be clear that we can use the code in the previous section to track our robot since the magnet counting is very similar to doorway sensing.\n",
+ "\n",
+ "But we are not done. A key lesson from the g-h filters chapter is to never throw information away. If you have information you should use it to improve your estimate. What information are we leaving out? Well, we know what our destination is, and we know what control inputs we are feeding to the wheels of the robot at each moment in time. For example, let's say that once a second we send a movement command to the robot - move left 1 unit, move right 1 unit, or stand still. This is obviously a simplification because I am not taking acceleration into account, but I am not trying to teach control theory. If I send the command 'move left 1 unit' I expect that in one second from now the robot will be 1 unit to the left of where it is now. But, wheels and motors are imperfect. We will assume that it never makes a mistake and goes right when told to go left, so the errors should be relatively small. Thus the robot might end up 0.9 units away, or maybe 1.2 units away. \n",
+ "\n",
+ "Now the entire solution is clear. For the dog which was moving independently we assumed that he kept moving in whatever direction he was previously moving. That is a dubious assumption for my dog! Robots are far more predictable. Instead of making a dubious prediction based on assumption of behavior we will feed in the command that we sent to the robot! In other words, when we call `predict()` we will pass in the commanded movement that we gave the robot along with a kernel that describes the likelihood of that movement."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Simulating the Train Behavior\n",
+ "\n",
+ "To fully implement this filter we need to simulate an imperfect train. When we command it to move it will sometimes make a small mistake, and it's sensor will sometimes return the incorrect value."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "class Train(object):\n",
+ "\n",
+ " def __init__(self, track_len, kernel=[1.], sensor_accuracy=.9):\n",
+ " self.track_len = track_len\n",
+ " self.pos = 0\n",
+ " self.kernel = kernel\n",
+ " self.sensor_accuracy = sensor_accuracy\n",
+ "\n",
+ " def move(self, distance=1):\n",
+ " \"\"\" move in the specified direction\n",
+ " with some small chance of error\"\"\"\n",
+ "\n",
+ " self.pos += distance\n",
+ " # insert random movement error according to kernel\n",
+ " r = random.random()\n",
+ " s = 0\n",
+ " offset = -(len(self.kernel) - 1) / 2\n",
+ " for k in self.kernel:\n",
+ " s += k\n",
+ " if r <= s:\n",
+ " break\n",
+ " offset += 1\n",
+ " self.pos = (self.pos + offset) % self.track_len\n",
+ " return self.pos\n",
+ "\n",
+ " def sense(self):\n",
+ " pos = self.pos\n",
+ " # insert random sensor error\n",
+ " r = random.random()\n",
+ " if r > self.sensor_accuracy:\n",
+ " if random.random() > 0.5:\n",
+ " pos += 1\n",
+ " else:\n",
+ " pos -= 1\n",
+ " return pos"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With that we are ready to write the simulation. We will put it in a function so that we can run it with different assumptions. I will assume that the robot always starts at the beginning of the track. The track is implemented as being 10 units long, but think of it as a track of length, say 10,000, with the magnet pattern repeated every 10 units. 10 makes it easier to plot and inspect."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "def simulate(iterations, kernel, sensor_accuracy, \n",
+ " move_distance, do_print=True):\n",
+ " track = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n",
+ "\n",
+ " belief = np.array([0.01] * 10)\n",
+ " belief[0] = .9\n",
+ " normalize(belief)\n",
+ " \n",
+ " robot = Train(len(track), kernel, sensor_accuracy)\n",
+ " for i in range(iterations):\n",
+ " robot.move(distance=move_distance)\n",
+ " m = robot.sense()\n",
+ " if do_print:\n",
+ " print('''time {}: pos {}, sensed {}, '''\n",
+ " '''at position {}'''.format(\n",
+ " i, robot.pos, m, track[robot.pos]))\n",
+ "\n",
+ " update(track, belief, m, sensor_accuracy)\n",
+ " index = np.argmax(belief)\n",
+ " if do_print:\n",
+ " print(''' predicted position is {}'''\n",
+ " ''' with confidence {:.4}%:'''.format(\n",
+ " index, belief[index]*100)) \n",
+ " if i < iterations - 1:\n",
+ " predict(belief, move_distance, kernel) \n",
+ "\n",
+ " bp.bar_plot(belief)\n",
+ " if do_print:\n",
+ " print()\n",
+ " print('final position is', robot.pos)\n",
+ " iindex = np.argmax(belief)\n",
+ " print('''predicted position is {} with'''\n",
+ " '''confidence {:.4}%:'''.format(\n",
+ " index, belief[index]*100))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Read the code and make sure you understand it. Now let's do a run with no sensor or movement error. If the code is correct it should be able to locate the robot with no error. The output is a bit tedious to read, but if you are at all unsure of how the update/predict cycle works make sure you read through it carefully to solidify your understanding."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time 0: pos 4.0, sensed 4.0, at position 4\n",
+ " predicted position is 4 with confidence 91.07%:\n",
+ "time 1: pos 8.0, sensed 8.0, at position 8\n",
+ " predicted position is 8 with confidence 99.99%:\n",
+ "time 2: pos 2.0, sensed 2.0, at position 2\n",
+ " predicted position is 2 with confidence 100.0%:\n",
+ "time 3: pos 6.0, sensed 6.0, at position 6\n",
+ " predicted position is 6 with confidence 100.0%:\n",
+ "\n",
+ "final position is 6.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Q4cONex2u/Hu\nu+9aHckyBw8eNIKCgoygoCAjODi44+vMzEyro1nm67O48u/JJ5+0OpplMjIyjAkTJhhDhw41IiIi\njDvuuMMoKyuzOpZf4VZ8hrFo0SJj7NixxpAhQ4xx48YZ999/v3Hs2DGrY1lq3759RlJSkjFs2DAj\nISHB2LFjh9WRLHfgwAEjODjYOHz4sNVR/MIXX3xh/PSnPzViY2MNm81mxMfHG0888YTR2tpqdTRL\n7dmzx7jpppuMoUOHGlFRUcaqVauMCxcuWB2r1/j4cwAAAMAk/f6aawAAAOB6oVwDAAAAJqFcAwAA\nACahXAMAAAAmoVwDAAAAJqFcAwAAACahXAMAAAAmoVwDAAAAJvlfhweLiCWD980AAAAASUVORK5C\nYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import random\n",
+ "\n",
+ "random.seed(3)\n",
+ "np.set_printoptions(precision=2, suppress=True, linewidth=60)\n",
+ "simulate(4, kernel=[1.], sensor_accuracy=.999,\n",
+ " move_distance=4, do_print=True)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We can see that the code was able to perfectly track the robot so we should feel reasonably confident that the code is working. Now let's see how it fairs with some errors. "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time 0: pos 4.0, sensed 4.0, at position 4\n",
+ " predicted position is 0 with confidence 84.11%:\n",
+ "time 1: pos 8.0, sensed 8.0, at position 8\n",
+ " predicted position is 4 with confidence 43.44%:\n",
+ "time 2: pos 2.0, sensed 2.0, at position 2\n",
+ " predicted position is 2 with confidence 81.09%:\n",
+ "time 3: pos 5.0, sensed 5.0, at position 5\n",
+ " predicted position is 5 with confidence 47.83%:\n",
+ "\n",
+ "final position is 5.0\n",
+ "predicted position is 5 withconfidence 47.83%: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WGD8q5gHMI1xgSBuub/2B/45f45g/AWq2nzmpJ7bFBPuvpQTnLxpsjlRQ5KKcCvPoVrktL\nS7Vu3Tq53W5NmTJFzz33nDIzM887f9++fXr44YfV2NiosWPH6sEHH9Tjjz9uWtEYeQb/m//gfOOX\n+OYPAMBw0uee68rKSi1btkxFRUVyuVxyOByaNWuWjh492uP8kydP6tZbb1VMTIyampq0fv16rVu3\nTiUlJaYXDwAAAASSPsN1SUmJcnNztWjRIiUnJ2vDhg2KiYlRWVlZj/P/8Ic/qLOzUxUVFZo8ebLu\nuusurVy5knANAACAYa/XbSFnzpxRc3OzfvnLX/qMO51O1dfX97imoaFBN910k0aPHu0z//HHH9eR\nI0c0YcIEE8oe3thfjL4M5z9Akvg6AQAMXUGGYRjnO9ja2qq4uDjV1tb67LF+6qmntHXrVh08eNBv\njdPp1Pjx4/Xyyy97xz777DMlJCSooaFB3/ve97zj7e3tZr0PAAAAYNBFRET4fG76fa6DgoLMfkkA\nAABgSOg1XEdGRiokJEQej8dn3OPxKCYmpsc1V111ldxut9/8c8cAAACA4arXPdejRo1SWlqaqqur\nddddd3nHa2pqNHfu3B7XZGRkaOXKlTp9+rR333VNTY3GjRvnt9/625fRAQAAgKGsz20hBQUF2rJl\nizZv3qwDBw5o6dKlcrvdysvLkyQVFhYqKyvLO//ee+9VWFiYcnJytH//fr355pt65plnVFBQcPHe\nBQAAABAA+nyITHZ2to4fP67i4mK1tbUpJSVFVVVVio+PlyS53W61tLR4519++eWqqanRQw89JLvd\nrrFjx2rFihVavnz5xXsXAAAAQADo9W4hAAAAAPrP9LuFBKrS0lIlJibKZrPJbrerrq7O6pIsU1tb\nq9mzZysuLk7BwcGqqKiwuiTLrV27VjfccIMiIiIUFRWl2bNna//+/VaXZalNmzYpNTVVERERioiI\nkMPhUFVVldVlBYy1a9cqODhYS5YssboUS/36179WcHCwz7/Y2Firy7JUW1ub7r//fkVFRclms2nK\nlCmqra21uizLJCQk+H2NBAcH64477rC6NMucPXtWjz76q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lZXV5cmTZqkTz75RL/4xS907bXXKjc31+rSBsbCO5UMqtLSUiMhIcEYPXq0Ybfb\njffee8/qkiyze/duIygoyAgKCjKCg4O9H+fm5lpdmmW+3Ytz/5588kmrS7NMTk6OMWHCBGP06NFG\nVFSUceuttxrV1dVWlxVQuBWfYcybN8+IjY01Ro0aZYwbN864++67jQMHDlhdlqV27NhhpKamGmPG\njDGSk5ONjRs3Wl2S5Xbt2mUEBwcbjY2NVpcSEL766ivj5z//uZGQkGDYbDYjKSnJeOyxx4zTp09b\nXZqltm3bZlx99dXG6NGjjZiYGGPJkiXGyZMnrS5rwHj8OQAAAGCSYb/nGgAAABgshGsAAADAJIRr\nAAAAwCSEawAAAMAkhGsAAADAJIRrAAAAwCSEawAAAMAkhGsAAADAJP8HUS+0ceWEGmwAAAAASUVO\nRK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "random.seed(3)\n",
+ "simulate(4, kernel=[.1, .8, .1], sensor_accuracy=.9,\n",
+ " move_distance=4, do_print=True)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Here we see that there was a sense error at time 1, but we are still quite confident in our position. \n",
+ "\n",
+ "Now lets run a very long simulation and see how the filter responds to errors."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtcAAADvCAYAAAA5OPi0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlcVPX+P/DXGRYZdcAFWURiSXMJNGE0xQ2X6Fpq3gzL\nLIUor1Qa0qL4RXFBuWnxuK5k6UPNNirv1UpSMHBB7QYhbrmGoSnDFa6BUkjA5/eHP+Y6zsAMcGYG\nnNfz8eBxL5/z+Zz35wC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WVl8Hq9qmcD\nQCaTQUNDw5dvb1Db6Ogoampq4PP5kEwmcXBwALPZjOnpaWkzHB0d4fDwEIlEAn6/H83NzWhra/u4\nF0rq0Krf9drtgH77XctuB9jvWvW77G7/Mcs1AHi9XtjtdphMJrS0tHy5o6eW4+NjGAyGj4+t3n8e\nGRlRPfv3zPfX4uKi6tnDw8Ow2WwwmUywWCzo7u7WrHgBuf/QODg4iKqqKuTn56O6uhpOpxPRaFRK\nNgD4fD40NzejoKAAv379wvr6urTsQCAARVGk3L38LJVKwePxwG63o7CwELW1tVhYWEA6nZY2w97e\nHurq6mAymWC1WjE+Po7Hx0dp+XqmRb/rtdsB/fa71t0OsN+16HfZ3c7HnxMRERER5ciPuHNNRERE\nRPQTcLkmIiIiIsoRLtdERERERDnC5ZqIiIiIKEe4XBMRERER5QiXayIiIiKiHOFyTURERESUI1yu\niYiIiIhyhMs1EREREVGO/APfKPqBGZxnvAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "with figsize(y=5):\n",
+ " for i in range (4):\n",
+ " random.seed(3)\n",
+ " plt.subplot(321+i)\n",
+ " simulate(148+i, kernel=[.1, .8, .1], \n",
+ " sensor_accuracy=.8,\n",
+ " move_distance=4, do_print=False)\n",
+ " plt.title ('iteration {}'.format(148+i))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We can see that there was a problem on iteration 149 as the confidence degrades. But within a few iterations the filter is able to correct itself and regain confidence in the estimated position."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Bayes Theorem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We developed the math in this chapter merely by reasoning about the information we have at each moment. In the process we discovered **Bayes Theorem**. We will go into the specifics of the math of Bayes theorem later in the book. For now we will take a more intuitive approach. Recall from the preface that Bayes theorem tells us how to compute the probability of an event given previous information. That is exactly what we have been doing in this chapter. With luck our code should match the Bayes Theorem equation! \n",
+ "\n",
+ "We implemented the `update()` function with this probability calculation:\n",
+ "\n",
+ "$$ \\mathtt{posterior} = \\frac{\\mathtt{likelihood}\\times \\mathtt{prior}}{\\mathtt{normalization}}$$ \n",
+ "\n",
+ "To review, the *prior* is the probability of something happening before we include the probability of the measurement (the *likelihood*) and the *posterior* is the probability we compute after incorporating the information from the measurement.\n",
+ "\n",
+ "Bayes theorem is\n",
+ "\n",
+ "$$P(A|B) = \\frac{P(B | A)\\, P(A)}{P(B)}\\cdot$$\n",
+ "\n",
+ "If you are not familiar with this notation, let's review. $P(A)$ means the probability of event $A$. If $A$ is the event of a fair coin landing heads, then $P(A) = 0.5$.\n",
+ "\n",
+ "$P(A|B)$ is called a **conditional probability**. That is, it represents the probability of $A$ happening *if* $B$ happened. For example, it is more likely to rain today if it also rained yesterday because rain systems tend to last more than one day. We'd write the probability of it raining today given that it rained yesterday as $P(\\mathtt{rain_{today}}|\\mathtt{rain_{yesterday}})$.\n",
+ "\n",
+ "In the Bayes theorem equation above $B$ is the *evidence*, $P(A)$ is the *prior*, $P(B | A)$ is the *likelihood*, and $P(A|B)$ is the *posterior*. By substituting the mathematical terms with the corresponding words you can see that Bayes theorem matches out update equation. Let's rewrite the equation in terms of our problem. We will use $x_i$ for the position at *i*, and $Z$ for the measurement. Hence, we want to know $P(x_i|Z)$, that is, the probability of the dog being at $x_i$ given the measurement $Z$. \n",
+ "\n",
+ "So, let's plug that into the equation and solve it.\n",
+ "\n",
+ "$$P(x_i|Z) = \\frac{P(Z|x_i) P(x_i)}{P(Z)}$$\n",
+ "\n",
+ "That looks ugly, but it is actually quite simple. Let's figure out what each term on the right means. First is $P(Z|x_i)$. This is the probability for the measurement at every cell $x_i$. $P(x_i)$ is the *prior* - our belief before incorporating the measurements. We multiply those together. This is just the unnormalized multiplication in the `update()` function, where `belief` is our prior $P(x_i)$.\n",
+ "\n",
+ "```python\n",
+ "for i, val in enumerate(map_):\n",
+ " if val == z:\n",
+ " belief[i] *= correct_scale\n",
+ " else:\n",
+ " belief[i] *= 1.\n",
+ "```\n",
+ "\n",
+ "I added the `else` here, which has no mathematical effect, to point out that every element in $x$ (called `belief` in the code) is multiplied by a probability. You may object that I am multiplying by a scale factor, which I am, but this scale factor is derived from the probability of the measurement being correct vs the probability being incorrect.\n",
+ "\n",
+ "The last term to consider is the denominator $P(Z)$. This is the probability of getting the measurement $Z$ without taking the location into account. We compute that by taking the sum of $x$, or `sum(belief)` in the code. That is how we compute the normalization! So, the `update()` function is doing nothing more than computing Bayes theorem.\n",
+ "\n",
+ "The literature often gives you these equations in the form of integrals. After all, an integral is just a sum over a continuous function. So, you might see Bayes' theorem written as\n",
+ "\n",
+ "$$P(A|B) = \\frac{P(B | A)\\, P(A)}{\\int P(B|A) P(B) \\mathtt{d}y}\\cdot$$\n",
+ "\n",
+ "In practice the denominator can be fiendishly difficult to solve analytically (a recent opinion piece for the Royal Statistical Society called it a \"dog's breakfast\" [8], and filtering textbooks are filled with integral laden equations which you cannot be expected to solve. We will learn more techniques to handle this in the **Particle Filtering** chapter. Until then, recognize that in practice it is just a normalization term over which we can sum. What I'm trying to say is that when you are faced with a page of integrals, just think of them of sums, and relate them back to this chapter, and often the difficulties will fade. Ask yourself \"why are we summing these values\", and \"why am I dividing by this term\". Surprisingly often the answer is readily apparent."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Total Probability Theorem\n",
+ "\n",
+ "We know now the formal mathematics behind the `update()` function; what about the `predict()` function? `predict()` implements the **total probability theorem**. Let's recall what `predict()` computed. It computed the probability of being at any given position given the probability of all the possible movement events. Let's express that as an equation. The probability of being at any position $i$ at time $t$ can be written as $P(X_i^t)$. We computed that as the sum of the prior at time $t-1$ $P(X_i^{t-1})$ multiplied by the probability of moving from cell $x_j$ to $x_i$. That is\n",
+ "\n",
+ "$$P(X_i^t) = \\sum_j P(X_i^{t-1}) P(x_i | x_j)$$\n",
+ "\n",
+ "That equation is called the *total probability theorem*. Quoting from Wikipedia [6] \"It expresses the total probability of an outcome which can be realized via several distinct events\". I could have given you that equation and implemented `predict()`, but your chances of understanding why the equation works would be slim. As a reminder, here is the code that computes this equation\n",
+ "\n",
+ "```python\n",
+ "for i in range(N):\n",
+ " for k in range (kN):\n",
+ " index = (i + (width-k) - offset) % N\n",
+ " result[i] += prob_dist[index] * kernel[k]\n",
+ "```"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Summary"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The code is very short, but the result is huge! We have implemented a form of a Bayesian filter. We have learned how to start with no information and derive information from noisy sensors. Even though the sensors in this chapter are very noisy (most sensors are more than 80% accurate, for example) we quickly converge on the most likely position for our dog. We have learned how the predict step always degrades our knowledge, but the addition of another measurement, even when it might have noise in it, improves our knowledge, allowing us to converge on the most likely result.\n",
+ "\n",
+ "If you followed the math carefully you will realize that all of this math is exact. The bar charts that we are displaying are not an *estimate* or *guess* - they are mathematically exact results that exactly represent our knowledge. The knowledge is probabilistic, to be sure, but it is exact, and correct.\n",
+ "\n",
+ "Furthermore, through basic reasoning we were able to discover two extremely important theorems: Bayes theorem and the total probability theorem. I hope you spent time on those sections as in almost any other source they will express filtering algorithms in terms of these two theorems. It will be your job to understand what these equations mean and how to turn them into code. \n",
+ "\n",
+ "This book is mostly about the Kalman filter. In the g-h filter chapter I told you that the Kalman filter is a type of g-h filter. It is also a type of Bayesian filter. It also uses Bayes theorem and the total probability theorem to filter data, although with a different set of assumptions and conditions than used in this chapter.\n",
+ "\n",
+ "The discrete Bayes filter allows us to filter sensors and track an object, but we are a long way from tracking an airplane or a car. This code only handles the 1 dimensional case, whereas cars and planes operate in 2 or 3 dimensions. Also, our position vector is *multimodal*. It expresses multiple beliefs at once. Imagine if your GPS told you \"it's 20% likely that you are here, but 10% likely that you are on this other road, and 5% likely that you are at one of 14 other locations\". That would not be very useful information. Also, the data is discrete. We split an area into 10 (or whatever) different locations, whereas in most real world applications we want to work with continuous data. We want to be able to represent moving 1 km, 1 meter, 1 mm, or any arbitrary amount, such as 2.347 cm. \n",
+ "\n",
+ "Finally, the bar charts may strike you as being a bit less certain than we would want. A 25% certainty may not give you a lot of confidence in the answer. Of course, what is important here is the ratio of this probability to the other probabilities in your vector. If the next largest bar is 23% then we are not very knowledgeable about our position, whereas if the next largest is 3% we are in fact quite certain. But this is not clear or intuitive. However, there is an extremely important insight that Kalman filters implement that will significantly improve our accuracy from the same data.\n",
+ "\n",
+ "\n",
+ "**If you can understand this chapter you will be able to understand and implement Kalman filters.** I cannot stress this enough. If anything is murky, go back and reread this chapter and play with the code. The rest of this book will build on the algorithms that we use here. If you don't intuitively understand why this filter works, and can't at least work through the math, you will have little success with the rest of the material. However, if you grasp the fundamental insight - multiplying probabilities when we measure, and shifting probabilities when we update leads to a converging solution - then you understand everything important you need for the Kalman filter. "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## References"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " * [1] D. Fox, W. Burgard, and S. Thrun. \"Monte carlo localization: Efficient position estimation for mobile robots.\" In *Journal of Artifical Intelligence Research*, 1999.\n",
+ " \n",
+ " http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume11/fox99a-html/jair-localize.html\n",
+ "\n",
+ "\n",
+ " * [2] Dieter Fox, et. al. \"Bayesian Filters for Location Estimation\". In *IEEE Pervasive Computing*, September 2003.\n",
+ " \n",
+ " http://swarmlab.unimaas.nl/wp-content/uploads/2012/07/fox2003bayesian.pdf\n",
+ " \n",
+ " \n",
+ " * [3] Sebastian Thrun. \"Artificial Intelligence for Robotics\".\n",
+ " \n",
+ " https://www.udacity.com/course/cs373\n",
+ " \n",
+ " \n",
+ " * [4] Khan Acadamy. \"Introduction to the Convolution\"\n",
+ " \n",
+ " https://www.khanacademy.org/math/differential-equations/laplace-transform/convolution-integral/v/introduction-to-the-convolution\n",
+ " \n",
+ " \n",
+ "* [5] Wikipedia. \"Convolution\"\n",
+ "\n",
+ " http://en.wikipedia.org/wiki/Convolution\n",
+ "\n",
+ "* [6] Wikipedia. \"Law of total probability\"\n",
+ "\n",
+ " http://en.wikipedia.org/wiki/Law_of_total_probability\n",
+ " \n",
+ "* [7] Wikipedia. \"Time Evolution\"\n",
+ "\n",
+ " https://en.wikipedia.org/wiki/Time_evolution\n",
+ " \n",
+ "* [8] We need to rethink how we teach statistics from the ground up\n",
+ " \n",
+ " http://www.statslife.org.uk/opinion/2405-we-need-to-rethink-how-we-teach-statistics-from-the-ground-up"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.4.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/04-One-Dimensional-Kalman-Filters.ipynb b/04-One-Dimensional-Kalman-Filters.ipynb
index fb73ed5..6577106 100644
--- a/04-One-Dimensional-Kalman-Filters.ipynb
+++ b/04-One-Dimensional-Kalman-Filters.ipynb
@@ -753,7 +753,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "The algebra for this is not extremely hard, but it is messy. It uses Bayes theorem to compute the posterior (new Gaussian) given the prior (old Gaussian) and evidence (the measurement. I've placed the math at the bottom of the chapter if you are interested in the details. Here I will present the results. The subscript $\\mathtt{z}$ stands for the *measurement*.\n",
+ "The algebra for this is not extremely hard, but it is messy. It uses Bayes theorem to compute the posterior (new Gaussian) given the prior (old Gaussian) and the likelihood (the probability for the measurement). I've placed the math at the bottom of the chapter if you are interested in the details. Here I will present the results. The subscript $\\mathtt{z}$ stands for the *measurement*.\n",
"$$\\begin{aligned}\n",
"\\mathcal{N}(\\mu_\\mathtt{posterior}, \\sigma_\\mathtt{posterior}^2) &= \\mathcal{N}(\\mu_\\mathtt{prior}, \\sigma_\\mathtt{prior}^2)\\times \\mathcal{N}(\\mu_\\mathtt{z}, \\sigma_\\mathtt{z}^2) \\\\\n",
"&= \\mathcal{N}(\\frac{\\sigma_\\mathtt{prior}^2 \\mu_\\mathtt{z} + \\sigma_\\mathtt{z}^2 \\mu_\\mathtt{prior}}{\\sigma_\\mathtt{prior}^2 + \\sigma_\\mathtt{z}^2},\\frac{1}{\\frac{1}{\\sigma_\\mathtt{prior}^2} + \\frac{1}{\\sigma_\\mathtt{z}^2}})\n",
@@ -2787,7 +2787,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.4.1"
+ "version": "3.4.3"
}
},
"nbformat": 4,
diff --git a/05-Multivariate-Gaussians.ipynb b/05-Multivariate-Gaussians.ipynb
index a2461ab..a78bf5b 100644
--- a/05-Multivariate-Gaussians.ipynb
+++ b/05-Multivariate-Gaussians.ipynb
@@ -1394,7 +1394,7 @@
"source": [
"It won't be clear until the next chapter how I calculate this covariance. Ignore the calculation, and think about what this implies. We have no easy way to say where the object really is because we are so uncertain about the velocity. Hence the ellipse stretches very far in the x-axis. Our uncertainty in velocity of course means it is also very spread in the y-axis. But as I said in the last paragraph, position and velocity is correlated. *If* the velocity is 5 m/s the next position would be 5, and *if* the velocity is 10 the next position would be 10. They are extremely correlated, so the ellipse must be very narrow. \n",
"\n",
- "This superposition of the two covariances is where the magic happens. The only reasonable estimate at time t=1 (where position=5) is roughly the *intersection* between the two covariance matrices! More exactly, we can use the math from the last section and *multiply* the two covariances together. From a Bayesian point of view we multiply the prior with the evidence to get the posterior. If we multiply the position covariance with the velocity covariance using the Bayesian equations we get the result shown in the next chart."
+ "This superposition of the two covariances is where the magic happens. The only reasonable estimate at time t=1 (where position=5) is roughly the *intersection* between the two covariance matrices! More exactly, we can use the math from the last section and *multiply* the two covariances together. From a Bayesian point of view we multiply the prior with the probability of the evidence (the *likelihood*) to get the posterior. If we multiply the position covariance with the velocity covariance using the Bayesian equations we get the result shown in the next chart."
]
},
{
@@ -1448,7 +1448,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "In summary we have taken advantage of the geometry and correlations of the system to produce a very accurate estimate. The math does not care whether we are working with two positions, or a position and a correlated velocity, or if these are spatial dimensions. If floor space is correlated to house price you can write a Kalman filter to track house prices. If age is correlated to disease incidence you can write a Kalman filter to track diseases. If the zombie population is inversely correlated with the number of shotguns then you can write a Kalman filter to track zombies. I showed you this in terms of geometry and talked about *triangulation*. That was just to build your intuition. Get used to thinking of these as Gaussians with correlations. If we can express our uncertainties as a multidimensional Gaussian we can then multiply the prior with the evidence and get a much more accurate result. "
+ "In summary we have taken advantage of the geometry and correlations of the system to produce a very accurate estimate. The math does not care whether we are working with two positions, or a position and a correlated velocity, or if these are spatial dimensions. If floor space is correlated to house price you can write a Kalman filter to track house prices. If age is correlated to disease incidence you can write a Kalman filter to track diseases. If the zombie population is inversely correlated with the number of shotguns then you can write a Kalman filter to track zombies. I showed you this in terms of geometry and talked about *triangulation*. That was just to build your intuition. Get used to thinking of these as Gaussians with correlations. If we can express our uncertainties as a multidimensional Gaussian we can then multiply the prior with the likelihood and get a much more accurate result. "
]
},
{
@@ -1485,7 +1485,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.4.1"
+ "version": "3.4.3"
}
},
"nbformat": 4,