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

WIP: Add DifferentialEquation: API for Bayesian inference of ODEs #3578

Closed
wants to merge 52 commits into from

Conversation

@Dpananos
Copy link
Contributor

commented Aug 2, 2019

This is a work in progress, and a part of Google Summer of Code 2019.

This PR adds:

  • ode submodule, which contains DifferntialEquation, the main tool for doing inference with ODEs.

  • Unit tests for ode

  • A Notebook showcasing how to use DifferentialEquation in a couple of examples.

As this is a work in progress, comments are much appreciated.

Dpananos and others added some commits Jul 30, 2019

SMC stabilize covariance matrix (#3573)
* stabilize covariance

* add release note

* fix test
WIP: Documentation cleanup (#3575)
* Fix typos in docstrings.

Fix some minor wording errors, but mostly fixed formatting issues.

* Update sphinx configuration.

Updated to make a deprecation warning go away. This should not change the behavior at all.

* Update MultiTrace docs.

Minor typo fixes and added MultiTrace attributes section.

* Fix RST issues in documentation.

* Remove obsolete file.

The `getting_started.rst` file does not yield output that is linked into the docs.  Instead, the index.rst file directly links to the pages once linked from getting_started.
@review-notebook-app

This comment has been minimized.

Copy link

commented Aug 2, 2019

Check out this pull request on ReviewNB: https://app.reviewnb.com/pymc-devs/pymc3/pull/3578

You'll be able to see notebook diffs and discuss changes. Powered by ReviewNB.

@Dpananos Dpananos changed the title [WIP] Add DifferentialEquation: API for Bayesian inference of ODEs WIP: Add DifferentialEquation: API for Bayesian inference of ODEs Aug 2, 2019

Dpananos added some commits Aug 2, 2019

Change test conditions
Added @pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32")
remove pytest decorator
Adding dectorator actually made coverage worse.

Dpananos added some commits Aug 2, 2019

@canyon289

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2019

Please add tests to ensure ValueErrors are being raised when expected :)
image

@Dpananos

This comment has been minimized.

Copy link
Contributor Author

commented Aug 3, 2019

Thanks for the catch @canyon289! Added the tests and will push later today.

pymc3/ode/ode.py Outdated Show resolved Hide resolved
@michaelosthege

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

This last PR fixes some typos in the notebook and fixes an issue with the ODEGradOp instantiation. This should lead to better performance.

please remember to resolve the respective discussions

def _simulate(self, parameters):
# Initial condition comprised of state initial conditions and raveled
# sensitivity matrix
y0 = np.concatenate([ parameters[self.n_odeparams:] , self._sens_ic])

This comment has been minimized.

Copy link
@junpenglao

junpenglao Aug 5, 2019

Member

Trailing whitespace after [ and ]

This comment has been minimized.

Copy link
@michaelosthege

michaelosthege Aug 5, 2019

Contributor

Our pylint settings are actually quite permissive when it comes to spaces. There are several empty lines, or spaces missing around operators

@@ -0,0 +1,596 @@
{

This comment has been minimized.

Copy link
@michaelosthege

michaelosthege Aug 6, 2019

Contributor

In many places, PyMC3 uses the test_value stuff to make sanity checks. Can we support this also for ODEs? (forgot to hit finish review button...)


Reply via ReviewNB

This comment has been minimized.

Copy link
@Dpananos

Dpananos Aug 6, 2019

Author Contributor

Can you show me an example?

aloctavodia and others added some commits Aug 6, 2019

Refactor smc out of step methods (#3579)
* move smc from step_methods to its own family

* black

* update notebooks

* add release note and fix lint

* add release note and fix lint

* minor fix docstring

* reorder arguments and minor fix docstring
Merge pull request #3586 from rpgoldman/sample-docstring
Clean up docstring for `sample`.
SMC stabilize covariance matrix (#3573)
* stabilize covariance

* add release note

* fix test
WIP: Documentation cleanup (#3575)
* Fix typos in docstrings.

Fix some minor wording errors, but mostly fixed formatting issues.

* Update sphinx configuration.

Updated to make a deprecation warning go away. This should not change the behavior at all.

* Update MultiTrace docs.

Minor typo fixes and added MultiTrace attributes section.

* Fix RST issues in documentation.

* Remove obsolete file.

The `getting_started.rst` file does not yield output that is linked into the docs.  Instead, the index.rst file directly links to the pages once linked from getting_started.
Change test conditions
Added @pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32")
remove pytest decorator
Adding dectorator actually made coverage worse.

@Dpananos Dpananos closed this Aug 15, 2019

@Dpananos

This comment has been minimized.

Copy link
Contributor Author

commented Aug 15, 2019

Will repoen another PR once I fix some more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.