From 49f29a11c3fb55d4b85ef0f892f89d2f758dcb56 Mon Sep 17 00:00:00 2001 From: Roger Labbe Date: Sun, 14 Sep 2014 12:20:03 -0700 Subject: [PATCH] Fixed toc and Preface Table of contents was pointing to the wrong preface, which was filled with blah blah blah. Added GIF of kalman filter tracking to show that the book includes animations. --- Preface.ipynb | 79 +++++++++++++++++++++++++++++------------ README.md | 6 ++-- table_of_contents.ipynb | 4 +-- 3 files changed, 61 insertions(+), 28 deletions(-) diff --git a/Preface.ipynb b/Preface.ipynb index 52389ca..cbace9f 100644 --- a/Preface.ipynb +++ b/Preface.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:4355fb1fa8ffbca2bd9948d7b105cb0b4b8015fa6e831024faef3fdc3e52a8ad" + "signature": "sha256:d9674c7ba1cf596502672910c80c28edb3d385cbedfeb8cf5fef06925368972b" }, "nbformat": 3, "nbformat_minor": 0, @@ -265,6 +265,49 @@ ], "prompt_number": 1 }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Introductory textbook for Kalman filters and Bayesian filters. All code is written in Python, and the book itself is written in Ipython Notebook so that you can run and modify the code in the book in place, seeing the results inside the book. What better way to learn?\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Reading Online\n", + "\n", + "\n", + "You may access this book via nbviewer at any time by using this address:\n", + "[*Read Online Now*](http://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/table_of_contents.ipynb)\n", + "\n", + "The quickest way to read the book is to read it online using the link above. The book is written as a collection of IPython Notebooks, an interactive, browser based system that allows you to combine text, Python, and math into your brower. The website http://nbviewer.org provides an IPython Notebook server that renders notebooks stored at github (or elsewhere). The rendering is done in real time when you load the book. If you read my book today, and then I make a change tomorrow, when you go back tomorrow you will see that change. Perhaps more importantly, the book uses animations to demonstrate how the algorithms perform over time. The PDF version of the book, discussed in the next paragraph, cannot show the animations. \n", + "\n", + "If you click on the link above it will take you to a table of contents which links you to this Preface as well as all of the chapters of the book. The top of each page also gives you links that show you where you are in the directory structure - clicking on the title of the book will take you to the top directory, which contains a subdirectory for each chapter. That is not nearly as nice as using the table of contents, but it does allow you to see all of the supporting material for the book as well. \n", + "\n", + "### PDF Version\n", + "I periodically generate a PDF of the book from the Notebooks. I do not do this for every check in, so the PDF will usually lag the content in github and on nbviewer.org. However, I do generate it whenever I make a substantial change. \n", + "\n", + "[*PDF Version of the book*](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/Kalman_and_Bayesian_Filters_in_Python.pdf)\n", + "\n", + "###Downloading the book\n", + "\n", + "However, this book is intended to be interactive and I recommend using it in that form. If you install IPython on your computer and then clone this book you will be able to run all of the code in the book yourself. You can perform experiments, see how filters react to different data, see how different filters react to the same data, and so on. I find this sort of immediate feedback both vital and invigorating. You do not have to wonder \"what happens if\". Try it and see!\n", + "\n", + "The github pages for this project are at http://rlabbe.github.io/Kalman-and-Bayesian-Filters-in-Python/ You can clone it to your hard drive with the command \n", + "\n", + " git clone http://rlabbe.github.io/Kalman-and-Bayesian-Filters-in-Python/\n", + " \n", + "Navigate to the directory, and run IPython notebook with the command \n", + "\n", + " ipython notebook\n", + "\n", + "If you need more instructions they are available in the static version of the book. Follow the link above, and read the installation appendix." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -273,11 +316,11 @@ "\n", "Not ready for public consumption. In development.\n", "\n", - "author's note: The chapter on g-h filters is fairly complete as far as planned content goes. The content for the discrete Bayesian chapter, chapter 2, is also fairly complete. After that I have questions in my mind as to the best way to present the statistics needed to understand the filters. I try to avoid the 'dump a semester of math into 4 pages' approach of most textbooks, but then again perhaps I put things off a bit too long. In any case, the subsequent chapters are due a strong editing cycle where I decide how to best develop these concepts. Otherwise I am pretty happy with the content for the one dimensional and multidimensional Kalman filter chapters. I know the code works, I am using it in real world projects at work, but there are areas where the content about the covariance matrices is pretty bad. The implementation is fine, the description is poor. Sorry. It will be corrected. \n", + "> author's note: The chapter on g-h filters is fairly complete as far as planned content goes. The content for the discrete Bayesian chapter, chapter 2, is also fairly complete. After that I have questions in my mind as to the best way to present the statistics needed to understand the filters. I try to avoid the 'dump a sememster of math into 4 pages' approash of most textbooks, but then again perhaps I put things off a bit too long. In any case, the subsequent chapters are due a strong editting cycle where I decide how to best develop these concepts. Otherwise I am pretty happy with the content for the one dimensional and multidimensional Kalman filter chapters. I know the code works, I am using it in real world projects at work, but there are areas where the content about the covariance matrices is pretty bad. The implementation is fine, the description is poor. Sorry. It will be corrected. \n", "\n", - "Beyond that the chapters are much more in a state of flux. Reader beware. My writing methodology is to just vomit out whatever is in my head, just to get material, and then go back and think through presentation, test code, refine, and so on. Whatever is checked in in these later chapters may be wrong and not ready for your use. \n", + "> Beyond that the chapters are much more in a state of flux. Reader beware. My writing methodology is to just vomit out whatever is in my head, just to get material, and then go back and think through presentation, test code, refine, and so on. Whatever is checked in in these later chapters may be wrong and not ready for your use. \n", "\n", - "Finally, nothing has been spell checked or proof read yet. I wish IPython Notebook had spell check, but it doesn't seem to. \n" + "> Finally, nothing has been spell checked or proof read yet. I with IPython Notebook had spell check, but it doesn't seem to.\n" ] }, { @@ -316,25 +359,14 @@ "level": 2, "metadata": {}, "source": [ - "Reading the book" + "Reading the book on NBViewer" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "There are multiple ways to read this book. However, it is intended to be interactive and I recommend using it in that form. If you install IPython on your computer and then clone this book you will be able to run all of the code in the book yourself. You can perform experiments, see how filters react to different data, see how different filters react to the same data, and so on. I find this sort of immediate feedback both vital and invigorating. You do not have to wonder \"what happens if\". Try it and see!\n", - "\n", - "If you do not want to do that you can read this book online. the website http://nbviewer.org provides an IPython Notebook server that renders a notebook stored at github (or elsewhere). The rendering is done in real time when you load the book. If you read my book today, and then I make a change tomorrow, when you go back tomorrow you will see that change. \n", - "\n", - "You may access this book via nbviewer at any by using this address:\n", - "\n", - "http://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/Preface.ipynb\n", - "\n", - "\n", - "If you prefer a PDF, it is available [here](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/Kalman_and_Bayesian_Filters_in_Python.pdf). I have to generate this PDF manually from the IPython Notebook, and I do not do that for every check in. During the book's development this PDF will often be somewhat out of date. I recommend the nbviewer version above if you can be online while reading.\n", - "\n", - "Finally, you may generate output in a variety of formats. I will not cover how to do that, other than to point you to [IPython nbconvert](http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html) [2]. You can convert this book into static HTML pages, latex, or PDF. While I don't recommend it particularly, it is useful for those that don't want to program and/or are working offline." + "If you are reading this by using NBViewer, for the most part navigation should be clear. The link \"" ] }, { @@ -353,10 +385,11 @@ "\n", "To use all features you will have to have IPython 2.0 installed, which is released and stable as of April 2014. Most of the book does not require that, but I do make use of the interactive plotting widgets introduced in this release. A few cells will not run if you have an older version installed.\n", "\n", - "You will need Python 2.7 or later installed. Almost all of my work is done in Python 2.7, but I periodically test on 3.3. I do not promise any specific check in will work in 3.X, however. I do use Python's \"from __future__ import ...\" statement to help with compatibility. For example, all prints need to use parenthesis. If you try to add, say, \"print 3.14\" into the book your script will fail; you must write \"print (3.4)\" as in Python 3.X.\n", + "You will need Python 2.7 or later installed. Almost all of my work is done in Python 3.4, but I periodically test on 2.y. I do not promise any specific check in will work in 2.7, however. I do use Python's \"from __future__ import ...\" statement to help with compatibility. For example, all prints need to use parenthesis. If you try to add, say, \"print 3.14\" into the book your script will fail; you must write \"print (3.4)\" as in Python 3.X.\n", "\n", - "You will need a recent version of NumPy, SciPy, and Matplotlib installed. I don't really know what the minimal might be. \n", - "I have numpy 1.71, SciPy 0.13.0, and Matplotlib 1.3.1 installed on my machines.\n", + "You will need a recent version of NumPy, SciPy, and Matplotlib installed. I don't really know what the minimal version requirement might be.\n", + "\n", + "I have numpy 1.71, SciPy 0.13.0, and Matplotlib 1.4.0 installed on my machines.\n", "\n", "Personally, I use the Anaconda Python distribution in all of my work, [available here](https://store.continuum.io/cshop/anaconda/) [3]. I am not selecting them out of favoritism, I am merely documenting my environment. Should you have trouble running any of the code, perhaps knowing this will help you." ] @@ -427,9 +460,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[1] http://www.greenteapress.com/\n", - "[2] http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html\n", - "[3] https://store.continuum.io/cshop/anaconda/\n" + "* [1] http://www.greenteapress.com/\n", + "* [2] http://ipython.org/ipython-doc/rel-1.0.0/interactive/nbconvert.html\n", + "* [3] https://store.continuum.io/cshop/anaconda/\n" ] } ], diff --git a/README.md b/README.md index a589839..6fca223 100644 --- a/README.md +++ b/README.md @@ -176,10 +176,10 @@ If you want to run the notebook on your computer, which is what I recommend, the To use all features you will have to have Ipython 2.0 installed, which is released and stable as of April 2014. Most of the book does not require that, but I do make use of the interactive plotting widgets introduced in this release. A few cells will not run if you have an older version installed. -You will need Python 2.7 or later installed. Almost all of my work is done in Python 2.7, but I periodically test on 3.3. I do not promise any specific check in will work in 3.X, however. I do use Python's "from __future__ import ..." statement to help with compatibility. For example, all prints need to use parenthesis. If you try to add, say, "print 3.14" into the book your script will fail; you must write "print (3.4)" as in Python 3.X. +You will need Python 2.7 or later installed. Almost all of my work is done in Python 3.4, but I periodically test on 2.7. I do not promise any specific check in will work in 2.7 however. I do use Python's "from __future__ import ..." statement to help with compatibility. For example, all prints need to use parenthesis. If you try to add, say, "print 3.14" into the book your script will fail; you must write "print (3.4)" as in Python 3.X. -You will need a recent version of NumPy, SciPy, and Matplotlib installed. I don't really know what the minimal might be. -I have numpy 1.71, SciPy 0.13.0, and Matplotlib 1.3.1 installed on my machines. +You will need a recent version of NumPy, SciPy, and Matplotlib installed. I don't really know what the minimal version might be. +I have numpy 1.71, SciPy 0.13.0, and Matplotlib 1.4.0 installed on my machines. Personally, I use the Anaconda Python distribution in all of my work, [available here](https://store.continuum.io/cshop/anaconda/). I am not selecting them out of favoritism, I am merely documenting my environment. Should you have trouble running any of the code, perhaps knowing this will help you. diff --git a/table_of_contents.ipynb b/table_of_contents.ipynb index 20385f8..280aa6a 100644 --- a/table_of_contents.ipynb +++ b/table_of_contents.ipynb @@ -18,9 +18,9 @@ "Table of Contents\n", "-----\n", "\n", - "[**Introduction**](http://nbviewer.ipython.org/urls/raw.github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/master/Introduction.ipynb)\n", + "[**Preface**](http://nbviewer.ipython.org/urls/raw.github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/master/Preface.ipynb)\n", " \n", - "Introduction to the Kalman filter. Explanation of the idea behind this book.\n", + "Explanation of the idea behind this book and how to use it.\n", "\n", "\n", "[**Chapter 1: The g-h Filter**](http://nbviewer.ipython.org/urls/raw.github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/master/Chapter01_gh_filter/g-h_filter.ipynb)\n",