Skip to content

Add Kalman Smoothing derivatives #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2022

Conversation

Jacob-Stevens-Haas
Copy link
Collaborator

I added a kalman smoothing global derivative method. Example:

import numpy as np
from matplotlib import pyplot as plt
from derivative import dxdt
t = np.arange(0,2*np.pi, .05)
x = np.sin(t) + .1 * np.random.randn(*t.shape)
xdot_hat = dxdt(x, t, kind="kalman", alpha=1)
print(np.max(xdot_hat-np.cos(t)))
plt.plot(t, np.cos(t), "b-", label="true derivatives")
plt.plot(t, xdot_hat, "bx", label="smoothed derivatives")
plt.plot(t,x, 'gx', label="noisy measurements")
plt.plot(t, np.sin(t), 'g-', label='true values')
plt.legend()

kalman example

Passes all tests, but I can't build the docs. I get:

Running Sphinx v3.5.4
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 5 source files that are out of date
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [100%] notebooks/Examples                                                         
Notebook error:
PandocMissing in notebooks/Examples.ipynb:
Pandoc wasn't found.
Please check that pandoc is installed:
https://pandoc.org/installing.html
make: *** [Makefile:20: html] Error 2

Is pandoc missing from pyproject.toml? Working on that now.

Kalman smoothing is a global method.  Matches interface of other methods and
passes all tests.
@andgoldschmidt andgoldschmidt merged commit bdf2c2b into andgoldschmidt:master May 13, 2022
@Jacob-Stevens-Haas Jacob-Stevens-Haas deleted the kalman branch June 15, 2023 01:34
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.

2 participants