exoplanet-dev / pymc-ext Goto Github PK
View Code? Open in Web Editor NEWPyMC Extras extracted from the "exoplanet" library
License: MIT License
PyMC Extras extracted from the "exoplanet" library
License: MIT License
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!
This can use a github action then push to an orphan branch. Keep it simple!
This depends on #1. But otherwise should be straightforward.
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]
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.
A lot of these changes, specifically those for tuning would be a great addition to PyMC3 directly. Have you considered PRing them upstream?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.