Skip to content

Pull in upstream changes and add internal build system#10

Open
yahehe wants to merge 294 commits into
developfrom
TPSI-2504-rlabbe
Open

Pull in upstream changes and add internal build system#10
yahehe wants to merge 294 commits into
developfrom
TPSI-2504-rlabbe

Conversation

@yahehe
Copy link
Copy Markdown

@yahehe yahehe commented Sep 30, 2022

  • Merges the upstream master with our changes. We do not introduce anything new, we just had some matplotlib handling and metadata
  • Adds an internal build system so we can publish something that fits our needs. We do not want to consume matplotlib downstream

rlabbe and others added 30 commits November 2, 2017 10:10
Fixed minor mistakes in the readme
Add update of member variables to EKF
Some algorithms require the predicted covariance, so now I save and
return it.
Last check in failed to add these files!
Computation of log-liklihood on every update is very expensive;
it was cutting the speed of the Kalman filter in half. Now you
must call a method which computes it for you. This also has the
advantage of being able to compute the likelihood of any measurement,
not just the one you pass to update()
Added functions to create a kinematic Kalman filter and a kinematic
state transition matrix.
The code for sizing and assignement of H was incorrect for the
kinematic filter
in two places. Now we compute it once and store it to gain a
bit of speed.
things like k.R = 1, and the result would be k.R == np.array([[1],[1]])
and such. It makes for tricky code, and is slower as well.
the entire book, but there admiteddly isn't much there. I've added
a link to my book in most of the classes to help point people
in the right direction.
The functions update and predict allow you to use floats instead
of matrices to implement the univariate case. However, there were
forms of dot(a,b).dot(c) in the code, which raise exceptions if
all the variables are floats. Changed to the nested form
dot(dot(a,b),c)
changed relevant int constants to floats. Along the way
added spaces after commas where needed, and converted the
remaining .dot calls to the nested dot(dot form.
I was importing Kalmanfilter, but it needed to be relative.
I was setting them to zero; if you call predit() or update()
you get an exception because the rest of the variables are
properly initialized.
It was creating H with the wrong dimension and value.
Updated the tests to test for this.
I was not creating all of the matrices with the correct size.
That fix is already checked in, but this tests for it.
I was computing F incorrectly if order_by_dim=False
I reshape z based on the KF's dimensions, but I had a few bugs since
I assumed that x must be shaped (N,1), but a lot of my code uses the
1D form.

I think I should remove the 1D form as it is pretty confusing and
incompatible with, for exmaple, the UKF module.
Felipe and others added 28 commits July 22, 2021 14:54
Adding defined arguments; in particular dt was undefined in the example
…alman

Fixing square root kalman (K, S, and off-diagonal elements of P)
…apes

Correct output shapes of sigma_points() documentation
Fixed repeated word in doc for EKF.py
included link to readthedocs documentation
kinematic_kf creates an object of type KalmanFilter. However,
you may want to use a different class, so now you can optionally
pass in a pre-created filter.
If you pass a list or tuple to pretty_str it will now print out
and indexed list of the content of the list, one per line
Copied code for computing the logpdf from scikit-learn to make the
tests more robust by comparing with a different compuational technique
was using np.size to get length of the z list, but now that we
allow None in the list that caused a warning that the array was
ragged. Switched to using len()
It creates deprecation warning if you dont' pass in 1D arrays.
Filterpy's mahalanobis function is more forgiving, so switched
to using it instead.
Added two functions; one to compare the states of two vectors, and
one to copy the states of one to another. Mostly useful for writing
unit tests.
Added method to automatically generate a __repr__ string from
a filtering class. Ran black to auto format everything.
If a variable has the format y=[[2.]] for each update, then the saver contains
[[[2.]], [[3.]], ...] and after flattening it was a 2D colmn array. This
is a bug, and I changed it to flatten that 2D column array to a 1D
array.
@shokoryu shokoryu mentioned this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.