-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bounds can cause fitting to fail #18
Comments
As an update, |
I'm setting up my model in the following way (python 2.7): a1 = Parameter(name='a1', value=200, min=0, max=1000)
a2 = Parameter(name='a2', value=300, min=0, max=2000)
a3 = Parameter(name='a3', value=400, min=0, max=2000)
b = Parameter(name='b', value=200, min=0, max=500)
t1 = Parameter(name='t1', value=0.0001, min=0)
t2 = Parameter(name='t2', value=0.07, min=0)
t3 = Parameter(name='t3', value=1., min=0)
t = Variable(name='t')
model = a1*exp(-t/t1) + a2*exp(-t/t2) + a3*exp(-t/t3) + b This gives some warnings:
I didnt get the warning in symfit 0.2.5, i do in 0.3.5. The warning goes away when adding upper bounds to the tx parameters. Is it no longer allowed to specify only left bound? |
Could you try to run your fitting with the If true, could you explicitely set your upper bound to t1 = Parameter(name='t1', value=0.0001, min=0, max=None) I guess there might be a difference in syntax between the two wrapped scipy methods. |
Your prediction is correcct, when I use
Fitting error: When I configure the parameters in the following way: a1 = Parameter(name='a1', value=200, min=0, max=1000)
a2 = Parameter(name='a2', value=300, min=0, max=2000)
a3 = Parameter(name='a3', value=400, min=0, max=2000)
b = Parameter(name='b', value=200, min=0, max=500)
t1 = Parameter(name='t1', value=0.0001, min=0, max=1000)
t2 = Parameter(name='t2', value=0.07, min=0, max=1000)
t3 = Parameter(name='t3', value=1., min=0, max=100) I dont get the warning, but I do get |
In some cases, supplying
symfit
with bounds to parameters makes the fitting converge to a non-solution, whereas without it finds the solution just fine. Since all bounds are handled by leastsqbound I think the bug is in that program.It would therefore be prudent to reintroduce the Minimize facilities and use them to handle all fitting.
The text was updated successfully, but these errors were encountered: