Commit Graph

41 Commits

Author SHA1 Message Date
Roger Labbe
b4e8c056e0 Eat matplotlib deprecation warning
matplotlib is issuing a deprecation warning whenever you use rcParams,
even if you are not using one of the deprecated values. This is
very annoying. I eat the deprecation while using rcParams.

https://github.com/matplotlib/matplotlib/issues/13118
2020-04-26 19:04:53 -07:00
Roger Labbe
3270a5b686 Updated for filterpy version 1.4.4
I changed the IMM filter to use the predict/update cycle, requiring
a code change in the Adaptive Filtering chapter.
2018-08-24 08:42:46 -07:00
Roger Labbe
5512aceaef Altering book format
Changed rest of chapters to use new formatting style. Also,
there is a bug in the current release of Jupyter that overwrites
the rcParams settings when you do the first import, so I had to
split the book format cell into two. This is actually better because
now the PDF, which strips out the formatting cell, will still have
the %matplotlib inline and import from future code.

Also, in the process of refactoring the information about Gaussian
and Bayes. Stuff is still strewn around too much. I need to make
this more streamlined. Chapters 2-4 talk about distributions, Bayes,
and Gaussians, and material is repeated a lot.
2018-08-05 09:20:48 -07:00
Roger Labbe
e9fe8621a0 Updated for FilterPy 1.4.0 2018-05-05 19:09:21 -07:00
Roger Labbe
d605763855 Added my own FloatSlider, IntSlider
They create a slider with continuous_update=False. Just keeping
code more readable by avoiding long lines.
2018-05-05 09:14:22 -07:00
Roger Labbe
5e6a503619 Updated for FilterPy 1.2.4, moved code around
Moved code specific to one notebook to the *_internal.py file
for that book.

Updated to require FilterPy 1.2.4 due to a fix of a bad bug in the
UKF RTS Smoother, and the change of likelihood from a function back
to a property.
2018-04-18 16:00:10 -07:00
Roger Labbe
1ca3ff5e37 Fixed numpy set_printoptions
for reasons I don't understand you have to call with suprres=True
and no othe rparameters for it to 'work', even though the
get_printoptions shows it as correctly set.
2018-02-02 10:51:00 -08:00
Roger Labbe
d86fb065cb Updated for FilterPy 1.2.0, added section
Added a section on Mahalanobis distance and on gating.
Updated to require filterpy 1.2.0.
2018-02-01 08:42:39 -08:00
Roger Labbe
850c7fc0dd Reformat, and changes to work with IPython 6.0
After a new Anaconda install I was getting a lot of minor errors
in the notebooks. I've fixed all of those. Along the ways I altered
the format of the PDF output to exclude the In[] Out[] tags so the
code is indented less. I also altered the font size of the notebooks
to better match fonts in other pages on chrome.

FilterPy was updated to 1.1.0, and this check in requires that release
at the minimum.
2017-11-18 17:14:31 -08:00
Roger Labbe
529585a4c8 Issue #144 - update variable est/prediction names
I erroneously named the prediction of x x_est, which is confusing at best.

There were also issues with plotsize. The %matplotlib notebook magic
is resetting the size of the plots. Not sure if this has something to do
with some of my plotting code or not. Anyway, I wrote a context manager
to reset the plot size after exiting interactive mode.
2017-06-12 09:30:27 -07:00
Roger Labbe
3d288d60d6 The base python installation has a file code.py; this causes
problems when trying to import files from the code subdirectory.

I also tried to rearange some code so that book_format does not need
to be imported if you are not running in a Jupyter Notebook.
2017-05-11 13:13:17 -07:00
Roger Labbe
96749eb378 Fixed interactive plots for PDF.
the plots generated by interactive plots (%matplotlib notebook) do
not show up in the PDF. This has meant that I haven't been able to
update the PDF since febuary. I switched the default plotting
mechanism to noninteractive.
2016-09-20 06:49:15 -07:00
Roger Labbe
6f1fd2f16f Updated to use absolute imports
I used to add .\code to the path, which was an absurd hack.
Now all code is imported with import code.foo.
2016-03-06 12:02:13 -08:00
Roger Labbe
fb21cf6313 Making book work in Python 2.7 2016-03-06 08:18:27 -08:00
Roger Labbe
ef67326af6 Change plots to interactive plots 2016-02-27 20:52:36 -08:00
Roger Labbe
6aea84f6b1 Switched to interactive plots!
Using %matplotlib notebook to render plots.

I made the g-h filter chapter work. There is a very good chance
I broke the other chapters. Need to push to really find out.
2016-02-27 17:10:09 -08:00
Roger Labbe
d5ea503fde More copy edits, updated for filterpy 0.1.2 2016-01-24 12:11:39 -08:00
Roger Labbe
856775e906 Major rewrites due to discrete bayes changes.
I've derived the x + Ky form for the univariate kalman filter.
I completely reordered material, cutting about 10 pages (pdf)
of material. I made the connection between the bayesian form
and orthogonal form more explicit.

Probably there are a lot of grammatical errors, but I wanted to get
these checked in.

I also altered the css - mainly the font.
2016-01-18 18:16:20 -08:00
Roger Labbe
d0b4a1f4bc Generalized discrete Bayes with likelihood.
All my code in this chapter hard coded the computation of the
likelihood inside the update() function, where it had no business.
Also, my treatment of the likelihood was rather hand wavey. By
pulling it out of update() and maing it explicit I have created
a firm foundation for the rest of the book.
2016-01-17 12:02:00 -08:00
Roger Labbe
23877ea4f3 Updated to require FilterPy 0.1.1
This version of filterpy supplies functions for discrete bayes
filters.
2016-01-17 06:21:30 -08:00
Roger Labbe
5ffd42a25d Fixed FilterPy versioning check error.
The code only worked for the third version number. If the first
or second version numbers were too small it didn't detect it.
2015-12-20 10:08:31 -08:00
Roger Labbe
3e65b5d2f7 Lots of book formatting changes.
Changed default sizes of plots, changed the book template for
pdf creation, and lots of minor edits, most changing bold to
italic, and removing italic for emphasis.
2015-11-26 13:08:40 -08:00
Roger Labbe
c0fe5e7de8 Book format changes.
Moved book_format out of code to simplify importing it into the
notebooks. Added code to it to suppress future warnings from
matplotlib 1.4.3, and to set the numpy print precision to 3
decimal places.
2015-11-25 13:29:40 -08:00
Roger Labbe
aba6a9dcf7 Moved all code to \code subdirectory.
All these changes are to make the book easier to run from
cloud.sagemath.org. You can share individual notebooks there,
but not entire projects.By putting everything under code at the
user only needs to grab that one directory.

More on sagemath later, if I decide to pursue that as a delivery
mechanism...
2015-07-13 23:16:04 -07:00
Roger Labbe
25a1c29e9e Updated to require FilterPy 0.0.22 2015-07-08 18:59:38 -07:00
Roger Labbe
0a4c54a56a Updated to include particle filter chapter. 2015-07-04 21:16:04 -07:00
Roger Labbe
d574383175 Updated required version for FilterPy. 2015-06-13 13:23:06 -07:00
Roger Labbe
3c3a5e5bf6 Final updates before merge to trunk.
Updated to work with FilterPy 0.0.19.
2015-06-08 19:21:18 -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
6b7368f91b Made graphs smaller.
Most of the graphs were really too tall. Well, we can quibble about that
but I made them smaller to reduce the PDF size and thus print size
of the full book.
2015-04-05 12:26:21 -07:00
Roger Labbe
8cc19ba117 Switched to IPython 3.0 format.
Here's hoping everything still works on nbviewer!
2015-03-02 16:48:52 -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
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
5e479234e1 Added function to change plot size. 2015-02-17 16:10:24 -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
fc993eff4c made code directory 2014-09-01 19:26:50 -07:00
Roger Labbe
ba7ba68d5d changed path to css styles 2014-09-01 18:40:58 -07:00
Roger Labbe
9f3c2c0fa7 Altered colors of plots.
Maybe not perfect yet, but I have signicantly changed the colors
and various other look-and-fell aspects of the plots.
2014-08-31 22:07:01 -07:00
Roger Labbe
b8cfefc8f0 Moved left margin to the left.
Last checkin had the same commit message. But I ran it in ./styles, so
the notebooks were not commited.
2014-05-16 14:01:37 -07:00
Roger Labbe
6b22c58972 Formatted plots to ggplot-like look. Getting ready to put on github as book. 2014-05-16 12:33:40 -07:00