Commit Graph

135 Commits

Author SHA1 Message Date
Roger Labbe
83f6795f72 Wording changes. 2016-11-02 08:38:18 -07:00
Roger Labbe
91e603c592 Merge branch 'master' of https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python 2016-09-23 12:49:37 -07:00
Roger Labbe
30874bae62 Issue #122.
Description of ellipse shape was incorrect.

While I was changing this, I also alterted the plots to make them
more readalbe.
2016-09-23 12:08:39 -07:00
Roger Labbe
b88a05d307 Merge pull request #119 from SonienTaegi/patch-1
mkf_internal.py : Fix duplicated parameter in plt.scatter(...)
2016-09-20 11:23:12 -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
SonienTaegi
dcbc9c4e96 mkf_internal.py : Fix duplicated parameter plt.scatter(...)
plt.scatter(...) can accept either 'c' or 'color' parameter but not both. This makes assert exception.
2016-09-20 11:07:59 +09:00
Roger Labbe
e9145dbc62 Deleted obsolete file particle_filter.py 2016-08-28 12:48:47 -07:00
Parker Lusk
086c76431f made gh_estimate3 consistent with text
wording change, data is below chart

added a colon

added a hyphen to list-like
2016-06-28 16:52:50 -06:00
Roger Labbe
510e720559 I used terms better suited to radars (elevation angle instead
of bearing, for example).
2016-05-19 18:39:26 -07:00
Roger Labbe
c32ca48542 Moved legends inside of plot.
The %matplotlib notebook back end does not account for things being
drown outside of the plot, and they end up getting partially or
fully cut off.
2016-03-07 07:16:59 -08: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
f62fb8bbe8 Reran with tight_layout for interactive plots
This is just so everything looks nice in nbviewer. I added
plt.tight_layout() to the interactive_plot context manager,
which makes plots fill the output cell better.
2016-02-28 09:46:06 -08:00
Roger Labbe
2594d8905c Added animated filtering
Rewrote some of the chapter examples to use animated plots. Makes
it so much easier to see how the filter is performing.
2016-02-28 08:35:51 -08:00
Roger Labbe
a647f96388 Made plots interactive 2016-02-27 21:40:21 -08:00
Roger Labbe
ef67326af6 Change plots to interactive plots 2016-02-27 20:52:36 -08:00
Roger Labbe
f3358f44d6 Switched to interactive plotting. 2016-02-27 20:04:40 -08:00
Roger Labbe
590af94807 Switching to interactive plots 2016-02-27 18:55:34 -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
1610678354 Worked on the IMM section.
It is more complete, but not finished.
2016-01-31 20:12:29 -08:00
Roger Labbe
57dda86f18 Copy editing. 2016-01-30 08:29:22 -08:00
Roger Labbe
aae7bbb368 Copy edits. 2016-01-24 18:52:31 -08:00
Roger Labbe
d5ea503fde More copy edits, updated for filterpy 0.1.2 2016-01-24 12:11:39 -08:00
Roger Labbe
c268a09f5f Rewrites for orthogonal version of eqns
The changes in the univariate chapter, where I derived the
eqn for K continue to ripple through the chapters.
2016-01-23 07:18:43 -08:00
Roger Labbe
d6becd7428 Ran notebooks to reflect css changes. 2016-01-18 18:41: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
5240944dd4 Ran all notebooks to use new css settings. 2016-01-17 20:44:23 -08:00
Roger Labbe
0a41e78aeb Added likelihood and orthogonal projections
Added the likelihood equations/form from the discrete bayes
chapter to better tie in that form of reasoning. then I converted
the 1d equations to the orthogonal projection form to show how
the Kalman gain is computed and where the residual comes from
computationally. This should make the full KF equations much more
approachable.
2016-01-17 20:16:27 -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
d9ba9fde22 Scatter plot of bearing shows 2 results.
The text in the book gave one example, and then hand waved an
explanation about a different bearing choice. It is clearer to
just show it in a graph.
2016-01-10 09:00:00 -08:00
Roger Labbe
800ea6c189 Cleaned up equations for UKF.
I was using a bunch of variable names that weren't consistent
with the rest of the book (but perhaps are more consistent with
the literature). It just made everything more challenging than
it needed to be, so instead of \mu and \sigma (e.g.) I use
\bar x and \bar P.

I also am in the middle of rewriting some sections for clarity,
but that work is not completed.
2016-01-09 08:52:03 -08:00
Roger Labbe
6b9b97927d Redid Discrete Bayes animations.
I added titles so you can see where in the processing the
graph is.

This surfaced a bug in matplotlib 1.5 (#5399) so I added
some code to work around that.
2016-01-09 08:49:29 -08:00
Roger Labbe
8a01161ea4 Streamlined description of EKF linearization 2016-01-03 11:32:22 -08:00
Adriano rsvp.github.com
6444d77818 code directory: Add __init__.py for access as package
Useful for absolute import.
2015-12-26 17:24:30 -08:00
Roger Labbe
77ba700e39 Revised particle filter chapter.
Pretty happy with it now. Needs copy editing, and probably an
easier introduction to convey the basic idea. Moved from a class
based approach to a procedural approach, and I like that very much.
2015-12-19 16:18:21 -08:00
Roger Labbe
3c270d0c87 Fixed latex typo. 2015-12-19 16:17:40 -08:00
Roger Labbe
41d8d246e0 Extensive copy editing. 2015-12-09 06:31:14 -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
7cd8e11b57 More work on multivariate gaussians.
Not copy edited yet, but more work on making the material on
multivariate gaussian more understandable (mostly by reordering
concepts).
2015-11-25 12:39:15 -08:00
Roger Labbe
6f6108780c Fixed errorbar plots in gh chapter.
I changed the ZZy-axis earlier, which meant that the bar for
sensor A was not visible.
2015-11-25 12:00:38 -08:00
Roger Labbe
1b71b73c55 Reran cells
Forgot to rerun all cells before last check in.
2015-11-22 11:14:13 -08:00
Roger Labbe
5ae739a2c6 Altered font size to be a bit more readable. 2015-11-21 12:54:45 -08:00
Roger Labbe
b030488cb3 Used better variable names for formatting code. 2015-11-21 12:54:23 -08:00
dnstanciu
585ebdaf2a Fixed JSON settings being overwritten with matplotlib version. 2015-11-18 19:18:08 +01:00
Roger Labbe
56ede47d83 Fixed deprecated use of axes.color_cycle
Matplotlib 1.5 deprecrates the use of axes.color_cycle in favor
of axes.prop_cycle

I prefer to use the new styles coming from matplotlib, but for now,
to maintain backwards compatibility, I am hand coding the styles
still.
2015-11-14 08:55:24 -08:00
JIMYL
8051fa3096 Fix systemic_resample float indexes
indexes should be created as INT array
2015-10-26 22:32:38 +08:00
Roger Labbe
4f7c896507 Fixed section numbering.
I had some sections at level 2 when they should have been
level 3.
2015-10-19 18:01:39 -07:00
Roger Labbe
2546428641 Updated filterpy requirement to 0.0.28 2015-08-29 08:33:40 -07:00
Roger Labbe
43b55214a8 Start of IMM section, lots left to do 2015-08-22 12:22:09 -07:00