Commit Graph

62 Commits

Author SHA1 Message Date
Roger Labbe
9b60578728 refactor to minimize code plot size.
Added code to set x,y labels and title, and to set xlim, ylim
in one line.

Also moved some plotting code to the *internal.py files.
2015-07-09 14:28:50 -07:00
Roger Labbe
dff91d9a6f Fixed notebooks for FilterPy code reorg.
I made a separate filterpy.stats module becuase it made
little sense to import filterpy.common for stats
functions. This required a lot of changes in the notebooks
and supporting code.
2015-07-08 18:42:12 -07:00
Roger Labbe
4306a09182 Made markers more reable in plots. 2015-07-08 16:13:03 -07:00
Roger Labbe
f8896bbb80 Lots of material on resampling.
Happy 4th of July!
2015-07-04 20:12:33 -07:00
Roger Labbe
24e70d7c77 Added MM filter bank. 2015-06-30 20:14:39 -07:00
Roger Labbe
1b92397175 Checkpoint. Added a lot to the particle filter chapter. 2015-06-28 13:38:12 -07:00
Roger Labbe
fbcef07499 Adding Particle filter chapter.
This is an early, incomplete draft, but it is time to get it into
source control so I can track changes. Not ready for public
consumption.
2015-06-27 08:37:14 -07:00
Roger Labbe
10a62649df Added chart of multiple Gaussians 2015-06-24 21:00:57 -07:00
Roger Labbe
5f593639d8 Altered plot styles.
Lines seemed to thick to see what is happening when they are close
to each other. Changed line width to 2.
2015-06-22 17:56:14 -07:00
Roger Labbe
51c9a8283e Wholesale changes to connect chapters together.
I made a lot of changes so that each chapter makes clear that
they are all implementing the same basic bayesian algorithm.

This required a lot of editting, and it doesn't make sense to
try to do that atomically, hence this huge check in.

I made a lot of edits, and haven't copy editted anything. i'm
sure I introduced a lot of problems and discontinuities.
2015-06-20 15:52:16 -07:00
Roger Labbe
5ffe5c67eb Added UKF/EKF comparison.
Had to adjust some examples and rerun notebooks in several places
to account for some code chantes that I made.
2015-06-17 09:12:31 -07:00
Roger Labbe
87e6f5c6e7 Removed testing code. 2015-06-17 08:04:06 -07:00
Roger Labbe
adba3e5915 Renamed a function. 2015-06-16 22:10:42 -07:00
Roger Labbe
1633d9cda9 Added fixed lag section. 2015-06-13 20:05:10 -07:00
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