Giter VIP home page Giter VIP logo

pymc-ext's People

Contributors

adrn avatar bmorris3 avatar dfm avatar ericagol avatar iancze avatar lgbouma avatar mrtommyb avatar pre-commit-ci[bot] avatar rodluger avatar vandalt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pymc-ext's Issues

New versions of theano have issues with NaNs

The unit vector test in exoplanet started failing (the one here will too, probably) because the default testval for that distribution gives a NaN probability. Figure out where that is going wrong and fix it!

Occasional Issues with Optimizing (MAP)

I am running pymc3 on a hierarchical Bayesian simulation for dust attenuation. I have a few (up to 5) independent variables and two dependent variables (which themselves are related through a prior). I have an interpolation model that compares posterior samples (data) to the model values. I have found that optimizing the likelihood and using the MAP as the starting point for NUTS sampling leads to better and quicker convergence in the chains. After I added a prior connecting the two dependent variables, I have occasionally run into the issue of the optimizer failing (presumably not coming up with anything). For example:

File "DustPymc3Interp.py", line 680, in polyNDDataBivarI
map_soln, map_info = pmx.optimize(return_info=True, start=start)
File "/mnt/home/gnagaraj/ceph/env/lib/python3.7/site-packages/pymc3_ext/optim
.py", line 135, in optimize
sys.stderr.write("message: {0}\n".format(info.message))
AttributeError: 'NoneType' object has no attribute 'message'

Here, start is simply some random configuration I assigned. Perhaps if I let return_info=False, I wouldn't get the NoneType message error, but I think the more important issue is that I am getting a NoneType in the first place. Could it just be that there is no message? That would be amazing (and annoying :-)).

I honestly don't know how to reproduce this error. It happens sporadically. For example, I have a few cases with the same properties (number of independent variables, number of galaxies and posterior samples used, etc.) but just a different set of independent variables, where one case succeeds but the other one doesn't. Here's what I would get in a successful case.

optimizing logp for variables: [rho, log_width2, log_width, ngrid, sig_n, taugrid]
message: Desired error not necessarily achieved due to precision loss.
logp: -418539.35894535476 -> 83080.45132546293
optimizing logp for variables: [rho, log_width2, log_width, ngrid, sig_n, taugrid]

  • Version of PyMC3: 3.11.2
  • Version of PyMC3-ext: 0.1.0
  • Operating system: GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
  • Python version & installation method (pip, conda, etc.): 3.7.3 (through pip)

Please let me know if you would like any other information. I mainly just wanted to let you know that it is possible for the optimizer to fail in weird ways.

PR to PyMC3?

A lot of these changes, specifically those for tuning would be a great addition to PyMC3 directly. Have you considered PRing them upstream?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.