[SciPy-User] optimize: RuntimeWarning Tolerance reached

Johannes Radinger johradinger at googlemail.com
Wed Jul 20 04:37:16 EDT 2011


Hej,
I posted that already in another thread which was topically different
and this is actually a new problem:

I use the optimize function to solve:
def func(x,s1,s2,m,A,p):
    return (p) * stats.norm.cdf(x, loc=m, scale=s1) + (1-p) *
stats.norm.cdf(x, loc=m, scale=s2) - A
x1=optimize.zeros.newton(func, 1., args=(s1,s2,m,A,p))


where m=0, A=0.6827 and following value-triples(s1,s2,p) causing
problems:
['0.453567', '56.449087', '0.945475']
['0.109604', '32.540055', '0.574013']
['0.152876', '7.009490', '0.646816']

The error I get is like:
Warning (from warnings module):
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/scipy/optimize/zeros.py", line 125
    warnings.warn(msg, RuntimeWarning)
RuntimeWarning: Tolerance of 1697.3557819 reached

but why is here the tolerance reached? what can I do to improve that
because the results I get aren't correct.

/Johannes



More information about the SciPy-User mailing list