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
Closed

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

wants to merge 52 commits into from

Conversation

Dpananos
Copy link
Contributor

@Dpananos Dpananos 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 14 commits July 30, 2019 19:16
* stabilize covariance

* add release note

* fix test
* 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
Copy link

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
Added @pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32")
Adding dectorator actually made coverage worse.
@canyon289
Copy link
Member

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

@Dpananos
Copy link
Contributor Author

Dpananos 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
Copy link
Member

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])
Copy link
Member

@junpenglao junpenglao Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace after [ and ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @@
{
Copy link
Member

@michaelosthege michaelosthege Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show me an example?

aloctavodia and others added 24 commits August 6, 2019 17:25
* 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
* stabilize covariance

* add release note

* fix test
* 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.
Added @pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32")
Adding dectorator actually made coverage worse.
@Dpananos Dpananos closed this Aug 15, 2019
@Dpananos
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants