Skip to content

lasso_missing model fails #1873

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

Closed
fonnesbeck opened this issue Mar 6, 2017 · 3 comments
Closed

lasso_missing model fails #1873

fonnesbeck opened this issue Mar 6, 2017 · 3 comments
Labels

Comments

@fonnesbeck
Copy link
Member

The lasso_missing.py model does not produce expected output when run under current master:

$ python lasso_missing.py
Warning: Desired error not necessarily achieved due to precision loss.
         Current function value: 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000
         Iterations: 0
         Function evaluations: 2
         Gradient evaluations: 1
Traceback (most recent call last):
  File "lasso_missing.py", line 43, in <module>
    start = pm.find_MAP()
  File "/Users/fonnescj/Repos/pymc3/pymc3/tuning/starting.py", line 153, in find_MAP
    specific_errors)
ValueError: Optimization error: max, logp or dlogp at max have non-finite values. Some values may be outside of distribution support. max: {'sib_mean_log_': array(-0.3665129244327545), 'siblings_imp_missing': array([], dtype=int64), 'p_disab_logodds_': array(0.0), 'disability_imp_missing': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), 'p_mother_logodds_': array(0.0), 'mother_imp_missing': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0]), 's_log_': array(1.6094379425048828), 'beta': array([ 0.1,  0.1,  0.1,  0.1,  0.1,  0.1,  0.1])} logp: array(nan) dlogp: array([  8.98253870e+01,  -5.85000000e+01,  -9.50000000e+00,
         5.58700682e+04,   6.49721961e+02,   3.32593980e+02,
         7.25313956e+02,   1.26741992e+02,   3.48175559e+04,
         3.19725981e+02,   2.59157984e+02])Check that 1) you don't have hierarchical parameters, these will lead to points with infinite density. 2) your distribution logp's are properly specified. Specific issues: 
beta.logp bad: nan
@springcoil springcoil added the bug label Mar 13, 2017
@springcoil
Copy link
Contributor

springcoil commented Mar 13, 2017

Ohh interesting. So I'm currently doing git bisect to see if I can diagnose this.
And this is the result I get.
[6cc0d0ab2daa7954cdecb9c2923f4479dbc18fea] Merge pull request #1685 from aseyboldt/fix-sparse

I wonder what happened in that commit.

@twiecki
Copy link
Member

twiecki commented Mar 13, 2017

@aseyboldt cc

@junpenglao
Copy link
Member

fixed in #2254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants