tensorflow / tensorflow/probability
Error in documentation of experimental.sequential.extended_kalman_filter
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
there are two small issues with the documentation of experimental.sequential.extended_kalman_filter.
- The code in the example does not run, giving
InvalidArgumentError: cannot compute Sub as input #1(zero-based) was expected to be a double tensor but is a float tensor [Op:Sub] name.
Changing
x = [np.zeros((2,), dtype=np.float32)]
to
x = [tf.zeros((2,), dtype=tf.float32)]
solves this.
-
The documentation states
observation_jacobian_fn: a Python
callablethat accepts a (batched) vector
of lengthstate_sizeand returns a (batched) matrix of size
[state_size, event_size], representing the Jacobian ofobservation_fn.
but the correct matrix size to be returned should be [event_size, state_size].
In the example, making observation_jacobian_fn return a Tensor of size [state_size, event_size] will cause the Kalman Filter to fail, while [event_size, state_size] works.
See also this colab https://colab.research.google.com/drive/1vUNMHQ1Fc3CwdpOMnKXqzqmQ2zM4A8Pp?usp=sharing
Thank you for the great package!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the documentation for experimental.sequential.extended_kalman_filter and run its example, using the linked Colab as a reproduction reference. Update the example's array construction and correct the documented observation_jacobian_fn matrix shape, then rerun the example to confirm it works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100