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

Implement a DataUpdateCallback #287

Merged
merged 52 commits into from
Feb 7, 2024
Merged

Implement a DataUpdateCallback #287

merged 52 commits into from
Feb 7, 2024

Conversation

nathanaelbosch
Copy link
Owner

@nathanaelbosch nathanaelbosch commented Jan 18, 2024

This PR implementents a DataUpdateCallback, which can be used to update the ODE solution on some external data. It can also compute the log-likelihood of the data, which in turn can be used for parameter inference.
Together with the PN data likelihood that we implemented in #281 (which can be accessed with sol.log_likelihood) this can be used to implement the recently proposed DALTON method (https://arxiv.org/abs/2306.05566), which could be a nice alternative to Fenrir.jl, according to the paper in particular for chaotic systems.

Things to do in this PR:

  • Implement a first version of the DataUpdateCallback
  • Make sure that it works with both non-Kronecker and Kronecker versions (i.e. EK0 and EK1)
  • Make sure that there is a way to only observe data partially. This could either be done by adding a keyword argument for a projection matrix, or a nicer but more involved approach coulc be to instead define a likelihood model (or many, one for each time step?).
  • Add tests! Unit and integration
  • Document this option: Maybe we could add a DALTON tutorial, so that we have both Fenrir an DALTON? This raises the question why Fenrir is in a separate package though.
  • Benchmark the different options on some parameter inference tasks. But this could also be a future PR, or could also be done by someone else.
  • EDIT (2024-02-06): The update! that is called in the DataLikelihoodCallback needs to consider the non-zero observation noise! Currently this is not handled properly.

@nathanaelbosch nathanaelbosch force-pushed the data-update-likelihood branch 2 times, most recently from 44b9568 to c6bea3b Compare February 6, 2024 14:56
@nathanaelbosch nathanaelbosch marked this pull request as ready for review February 7, 2024 13:26
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (3bb4739) 93.41% compared to head (3092843) 92.87%.

❗ Current head 3092843 differs from pull request most recent head 290f319. Consider uploading reports for the commit 290f319 to get more accurate results

Files Patch % Lines
src/data_likelihoods/dalton.jl 68.42% 6 Missing ⚠️
src/data_likelihoods/fenrir.jl 89.28% 6 Missing ⚠️
src/data_likelihoods/filtering.jl 66.66% 4 Missing ⚠️
src/callbacks/dataupdate.jl 94.28% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
- Coverage   93.41%   92.87%   -0.54%     
==========================================
  Files          36       40       +4     
  Lines        1685     1810     +125     
==========================================
+ Hits         1574     1681     +107     
- Misses        111      129      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nathanaelbosch nathanaelbosch merged commit f5d7a64 into main Feb 7, 2024
6 checks passed
@nathanaelbosch nathanaelbosch deleted the data-update-likelihood branch February 7, 2024 16:26
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.

1 participant