Skip to content
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

No solution when using engine="numba" for Kalman Filter #12

Open
martinvonk opened this issue Jan 18, 2023 · 1 comment
Open

No solution when using engine="numba" for Kalman Filter #12

martinvonk opened this issue Jan 18, 2023 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@martinvonk
Copy link
Collaborator

For some datasets, the optimization does not succeed due to a ZeroDivisionError in SciPy.

Can be reproduced with the following dataset: test.csv

df = pandas.read_csv(test.csv, index_col=0, parse_dates=True)
mt = metran.Metran(df)
mt.solve()

The issue can be resolved by using in the SPKalmanFilter(engine="numpy"). I discussed this issue with @dbrakenhoff and we suspect that engine="numpy" is more robust since it fills in inf or nan for logarithms and fractions automatically while engine="numba" does not.

This can be resolved by allowing the user to specify the SPKalmanFilter engine which is currently only possible by changing the source code.

@martinvonk martinvonk added bug Something isn't working enhancement New feature or request labels Jan 18, 2023
@martinvonk martinvonk self-assigned this Jan 18, 2023
@dbrakenhoff
Copy link
Member

Option for passing engine has been implemented by #13.

Issue remains open to figure out why engine="numba" fails and engine="numpy" produces a communality >100% and some runtime warnings about illegal values in np.log.

Perhaps @wlberendrecht can take a look sometime 😇 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants