lmfit doesn't work properly in Jupyter notebook?

167 views
Skip to first unread message

Debra McCaffrey

unread,
Sep 28, 2016, 3:40:04 PM9/28/16
to lmfit-py
Maybe there's something I'm missing about using Jupyter, but it gives me garbage results for a fitting. I wrote a custom model for my data in Spyder that works perfectly fine, but analyzing the same data with the same code in Jupyter doesn't converge on anything sensible. The % errors for the parameters are all in the millions. Even when I initialize it with the parameter values I get in Spyder, Jupyter still converges on something ridiculous. Any idea what might be going on?

Andrew Nelson

unread,
Sep 28, 2016, 4:36:50 PM9/28/16
to lmfit-py

In order for us to help you you're going to have to give us the smallest self contained script that reproduces the problem. You also need to tell us which lmfit version you have.


On 29 Sep 2016 5:40 am, "Debra McCaffrey" <dlmcc...@gmail.com> wrote:
Maybe there's something I'm missing about using Jupyter, but it gives me garbage results for a fitting. I wrote a custom model for my data in Spyder that works perfectly fine, but analyzing the same data with the same code in Jupyter doesn't converge on anything sensible. The % errors for the parameters are all in the millions. Even when I initialize it with the parameter values I get in Spyder, Jupyter still converges on something ridiculous. Any idea what might be going on?

--
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+unsubscribe@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/7face21e-115d-4104-a8bd-30b9a408dc76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Newville

unread,
Sep 28, 2016, 5:54:57 PM9/28/16
to lmfit-py
Hi Debra,
I agree with Andrew that a working example would be necessary to give much real assistance.

It might seem obvious, but lmfit is a Python package.  If a program using lmfit works in Python and does not work in Jupyter, the problem is clearly with Jupyter.  It's not that surprising to me, and it has happened before.

If I was forced to guess, I would guess that it had something to do with pickling and/or IPython using some other process to do the actual work.

--Matt

Debra McCaffrey

unread,
Sep 28, 2016, 6:24:18 PM9/28/16
to lmfit-py
Yes, I thought the problem was Jupyter initially, too, for the same reason you weren't surprised.

Turns out that the problem was with the input data. I lost data somewhere between Spyder and Jupyter. It's working now. Thanks for responding, though!

Deb
Reply all
Reply to author
Forward
0 new messages