Commit Graph

48 Commits

Author SHA1 Message Date
Roger Labbe
f8057cd917 UKF chapter updated for Merwe parametization.
Chapter is not complete; checking in because I am beginning to alter
the formulation of unscented_transform in filterpy.
2015-06-07 17:03:35 -07:00
Roger Labbe
758bd2c7f4 Working for UKF rename.
Most of the text is wrong, but changed code to use the
renamed ScaledUnscentedKalmanFilter.

Checking in with bad text because I am in the process of changing
FilterPy to use a class for the sigma points to make it easier
to change the sigma point generation, leaving us with one
UKF class instead of several.
2015-06-06 19:49:56 -07:00
Roger Labbe
54bce9d7a0 Added EKF robot localization example.
Still needs a lot of explanation; mostly the implementation is there
for now.
2015-05-30 14:44:49 -07:00
Roger Labbe
a0b7a50b05 More math material for KF.
Added better explanation of P = FPF' + Q.

Moved conversion of multivariate equations to univariate eqs. to the
math chapter.

Moved the walkthrough of KalmanFilter to an appendix.
2015-05-10 18:28:45 -07:00
Roger Labbe
752320ad01 Formatting and experiments.
Let this check in get away from me. Bunch of small formatting sttuf
in the various chapters, some experimental animations and code, etc.
Not a clearly delineated check in.
2015-05-09 10:21:36 -07:00
Roger Labbe
8bae16b811 Changes to condense material.
Lots of small changes to try to get page count down. I'm not liking
this.
2015-04-20 17:14:51 -07:00
Roger Labbe
dda63fb329 This extension does not work with IPython 3+. 2015-04-19 09:36:46 -07:00
Roger Labbe
0086fcd201 Changes to bring page count down.
Made plots smaller, moved legends outside of plot (so smallersize
is still readable), moved plotting code into external modules.
2015-04-18 14:52:41 -07:00
Roger Labbe
5f7c7de378 More info on mean, std, and variance.
I had information on these rather buried, and did not have a single example
of how to compute them. Now the first part of the chapter covers this much
more thoroughly.

Also added a section on plotting exponentials. Not sure I want to retain
it; it is a bit 'light'.
2015-03-07 15:27:56 -08:00
Roger Labbe
ed2af0cb50 Minor fixes.
538.json had some settings that were apparently made obsolete.

Somehow a cell in the chapter was set to raw.
2015-03-05 21:50:43 -08:00
Roger Labbe
b32deadfa6 Fixed heading numbers.
Some sections jumped from level 2 to level 4, for example.

Also played around with generating book to HTML. I like it, but
it needs some work. The Calico table of content generator cannot
deal with different headers with the same name, for example.

I want to go to HTML so I can use Bokeh to have interactive plots.
But that means no more PDF, because Bokeh will not export to
PDF.
2015-03-03 12:52:44 -08:00
Roger Labbe
08328f0f0b Expanded ILS coverage.
Fixed notation for a priori and a posteriori variables.
Explained how to compute H matrix by linearizing.
2015-03-01 11:16:59 -08:00
Roger Labbe
8fc4d99fc3 Added code for ILS.
The description is not complete, but we have an implementation
of the iterated least squares.
2015-02-27 21:21:54 -08:00
Roger Labbe
458b12956e Fixed diverging UKF filter.
The UKF for the circle tracking was diverging. Also,
I have partially started the section on the ILS, but
much remains to be done on it.
2015-02-27 16:23:53 -08:00
Roger Labbe
37743bf604 Extensive addtions to UKF chapter.
I think I finally arrived at a good ordering of material.
Started with implementing a linear problem just so we can
see how it differs from the linear KF, then added problems
step by step. Got rid of most of the poor performing filters.
2015-02-22 11:33:51 -08:00
Roger Labbe
48f7eadc3e Refactoring UKF chapter.
Still a lot of work to be done, but I'm writing more realistic examples,
and reordering the material.
2015-02-16 07:10:01 -08:00
Roger Labbe
9c43e01b9e Changed text to account for chapter reordering.
UKF and EKF chapters were reordered, and I needed to alter some
text to reflect that.
2015-02-13 20:41:38 -08:00
Roger Labbe
79387a85cb Reworked section on multivariate correlations
My charts were mixing position vs time, which was pretty confusing.
I changed it to position vs velocity, and demonstrated how multipying
the covariances lead to a much better result.
2015-02-01 20:39:08 -08:00
Roger Labbe
9117261d25 Normalized plot styles across chapters.
I had a lot of problems with lines being visible, and ended up
using different styles in different places. I found a style that
seems to work everywhere and put the code in book_plots.py.
2015-01-31 22:42:19 -08:00
Roger Labbe
33c745d997 Edits for reorg
I moved book_format.py to the root directory so that all of the
notebooks do not need to modify the system path to import it. It
modifies the path on import so that all of the code in ./code can
then be accessed.

Altered links to nbviewer to account for no longer using subdirectories.
2015-01-27 15:14:06 -08:00
Roger Labbe
8416da7fdc Moved Chapter 2 as part of reorg 2015-01-27 09:51:52 -08:00
Roger Labbe
8b5122f21d Moved chapter 01 as part of book reorg 2015-01-27 09:24:52 -08:00
Roger Labbe
f6bf3b88fa Reordered color cycle.
I need to change some of the colors because they do not render
well when next to each other, as is common when I am plotting
filter output vs measurement. For now I made the yellow color
last as it is the hardest to see.
2015-01-14 11:06:09 -08:00
Roger Labbe
b97d71879b Removed cide that runs on import
When editting a notebook I tend to rerun the cells many times.
But imports are only done once, so the code in book_format()
is only run the first time. I put all of that code in a function
so that it is run every time.
2015-01-13 07:17:45 -08:00
Roger Labbe
573c9429c8 Set numpy printing to suppress scientific output. 2015-01-11 00:12:21 -08:00
Roger Labbe
bb0f9eb5ef Python 2.7 compatibility bug.
I was overwriting x,y variables with the list comprehension, causing
the lists in x,y to be replaced with a single value.
2014-12-31 13:22:16 -08:00
Roger Labbe
401a0004e1 Unicode problems with Python 2.7.
I read the matplotlib rcParams from a json file. The json module
always uses Unicode, but this does not work in Python 2.7. This
was causing the plots not to appear if using Python 2.7.

Wrote code to detect Python version and to convert to ASCII if
Python version 2.
2014-12-31 10:56:09 -08:00
Roger Labbe
7b6acde781 Removed gray background from 538 style.
white background renders better on cheap LCDs, and it will print better as well.
2014-12-22 14:20:42 -08:00
Roger Labbe
9e6c6ffb5f Removed need for matplotlibs 538 style.
I got the original code from the author, Cameron Davidson-Pilon,
modified it for the minor changes I make for the book, and put it
in 538.json. The main gain is that somebody doesn't need bleeding
edge matplotlib installed to get the 538 look.
2014-12-22 13:34:50 -08:00
Roger Labbe
5a60d94d6a Switched to 538 plot style.
I like this one the best.
2014-12-22 12:29:24 -08:00
Roger Labbe
874a2ed59c Switched to ggplot style plotting. 2014-12-22 12:15:19 -08:00
Roger Labbe
74a18b72c5 Additions to MKF chapter.
Several changes and clarifications. Added chart showing 2d distribution
of points for multivariate gaussian. Improved some discussions. Fixed
some typos.
2014-12-20 20:00:17 -08:00
Roger Labbe
7a588b0683 Added radar tracking problem.
Added the radar tracking problem from the EKF chapter to the UKF
chapter.

fixed bug in ekf_internal that was drawing the radar image on import.
2014-12-13 21:07:11 -08:00
Roger Labbe
0c6999e25f Batch processing and RTS.
This belonged with the last check in. Added desciptions on
batch processing and using the RTS smoothing algorithm.
2014-12-13 20:05:06 -08:00
Roger Labbe
f73719970d Expansion of UKF chapter.
Wrote several examples. Still more to do.
2014-11-30 15:34:06 -08:00
Roger Labbe
7a343857f0 removed explicit call to test code. 2014-11-24 17:58:11 -08:00
Roger Labbe
66f20b745e More work on R and Q.
Added more examples and cleaned up explanations on modifying R
and Q. In particular, the filter setting for R was not the same
as the simulated noise for no obvious reason. Also, names were
bad R instead of R_var, for example.
2014-11-19 23:50:11 -08:00
Roger Labbe
fe9df8a482 Added animation of multivariate tracking. 2014-09-18 13:43:16 -07:00
Roger Labbe
d8336ceae7 Added covariance ellipse animatoin. 2014-09-15 20:07:26 -07:00
Roger Labbe
cbfd8db15c Fixed errors in probability density function.
For some reason I was calling the PDF the probability, when
of course it is the probability density.
2014-09-14 21:22:00 -07:00
Roger Labbe
b4e991b783 Put GIF animation code into py script.
The animation script used in the KF chapter is general enough
to be used by the entire book, so I removed it from the notebook
and put it in gif_animate.py
2014-09-14 12:44:16 -07:00
Roger Labbe
82c5cbe71c Added animations to Discrete Bayes
Beginning of adding animations to the chapters. I wrote the
existing material not assuming animations, so it is quite
possible that I will want to revise the chapter to better
make use of this ability. For now I just animated two different
update/predict cycles.
2014-09-13 11:15:40 -07:00
Roger Labbe
1f806719f3 Fixed path issues, improved gaussian discussion.
Chapter was not adding ../code to the search path. Multivarite discusion about the ellipses
was a bit unclear about the relationship of the standard deviation.
2014-09-05 08:10:47 -07:00
Roger Labbe
842232d2ab Fixed subdirectory issue.
I changed the structure to put code in ./code, but that didn't work for preface,
whish is not in a subdirectory (parallel to ./code).
2014-09-02 20:34:18 -07:00
Roger Labbe
42d4ace9d1 more fixes for code directory 2014-09-01 19:49:25 -07:00
Roger Labbe
9ccf46c017 more changes for code directory 2014-09-01 19:44:18 -07:00
Roger Labbe
81c1bddcff fixes due to code directory 2014-09-01 19:34:01 -07:00
Roger Labbe
fc993eff4c made code directory 2014-09-01 19:26:50 -07:00