[Scipy-tickets] [SciPy] #1366: using ODR.set_iprint() causes ODR.run() to fail

SciPy Trac scipy-tickets@scipy....
Mon Jan 17 16:35:14 CST 2011


#1366: using ODR.set_iprint() causes ODR.run() to fail
-----------------------+----------------------------------------------------
 Reporter:  kaufman    |       Owner:  cdavid
     Type:  defect     |      Status:  new   
 Priority:  normal     |   Milestone:  0.9.0 
Component:  scipy.odr  |     Version:  0.8.0 
 Keywords:             |  
-----------------------+----------------------------------------------------
 given this code:

 {{{
 def func(B,x):
   return B[0] + B[1] * x

 p = odr.Model(func)
 data = odr.RealData(arange(10),12 * arange(10))
 o = odr.ODR(data, p, beta0=[0.1,13])
 #o.set_iprint(init=0,iter=0,final=0)
 o.run().pprint()
 }}}


 gives the output:[[BR]]

 {{{
 Beta: [ -1.03894086e-29   1.20000000e+01]
 Beta Std Error: [  1.72418464e-14   1.02131890e-15]
 Beta Covariance: [[ 144.99998044   -0.        ]
  [  -0.            0.50877192]]
 Residual Variance: 2.0502159183e-30
 Inverse Condition #: 0.000455860533422
 Reason(s) for Halting:
   Numerical error detected
 }}}


 if I uncomment the o.set_iprint() line I get:

 {{{
 Beta: [  0.1  13. ]
 Beta Std Error: [ 46.46471082   8.70373155]
 Beta Covariance: [[ 58.72749001  -9.27290916]
  [ -9.27290916   2.06065808]]
 Residual Variance: 36.7625
 Inverse Condition #: 0.000774901806289
 Reason(s) for Halting:
   Numerical error detected
 }}}


 changing the values of init, iter, final doesn't change the end result
 that the regression doesn't seem to take place.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1366>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list