Re: EMCEE ERROR, WARNING:root:Too few points to create valid contours

2,348 views
Skip to first unread message
Message has been deleted

Peter Metz

unread,
Sep 26, 2018, 5:55:40 PM9/26/18
to lmfit-py
I happened to be passing through. 

The latter Too Few Points warning we discussed here in an earlier question:

https://groups.google.com/forum/#!searchin/lmfit-py/metz%7Csort:date/lmfit-py/Kom5SIAhFng/AFTlWNzvAwAJ

The math warning in the emcee package sounds like you're passing in unacceptable arguments, probably as computed in your log probability function? I didn't find the source at-a-glance.


Happy fitting,
Peter

On Wednesday, September 26, 2018 at 5:18:34 PM UTC-4, Ethan wrote:
Dear Friends,

Using the EMCEE tutorial I've written the code in the attachment. But the Python sends error.
I am confused and I don't know how should I do.
The error is:

Warning (from warnings module):
  File "C:\Python36-32\lib\site-packages\emcee\ensemble.py", line 335
    lnpdiff = (self.dim - 1.) * np.log(zz) + newlnprob - lnprob0
RuntimeWarning: invalid value encountered in subtract
Warning (from warnings module):
  File "C:\Python36-32\lib\site-packages\emcee\ensemble.py", line 336
    accept = (lnpdiff > np.log(self._random.rand(len(lnpdiff))))
RuntimeWarning: invalid value encountered in greater
WARNING:root:Too few points to create valid contours
WARNING:root:Too few points to create valid contours
WARNING:root:Too few points to create valid contours

I appreciate your help.

Ethan

unread,
Sep 26, 2018, 6:01:52 PM9/26/18
to lmfit-py
I could not find any solution for my problem. Indeed I attached the source code.

Matt Newville

unread,
Sep 26, 2018, 8:55:33 PM9/26/18
to lmfit-py
Hi Ethan,

Sorry, but I think that this is not directly a question about lmfit, but about general use of emcee.  I do hope you can get a good answer, and perhaps you will get one on this forum.  But I'm not sure this is the right place to expect for that.

Cheers,

--Matt

Andrew Nelson

unread,
Sep 26, 2018, 11:40:13 PM9/26/18
to lmfit-py
I suspect that one or more of the walkers initial states has a non finite probability.

--
You received this message because you are subscribed to the Google Groups "lmfit-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmfit-py+u...@googlegroups.com.
To post to this group, send email to lmfi...@googlegroups.com.
Visit this group at https://groups.google.com/group/lmfit-py.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CA%2B7ESbp_oVPL8sWfbxSEFcpdzN%2BJ%2BEYetR52rnx%3DNmAGjiYjCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages