def lm_lambda_recipe (   self,
  old_chi2 = None,
  new_chi2 = None 
)

One choice of a schedule for adjusting the Levenberg-Marquardt parameter. Not the only one!

Definition at line 623 of file fitting_toolkit.py.

00623                                                             :
00624         "adjust the Levenberg-marquardt lambda parameter based on the old and new chi^2 values"
00625         if old_chi2 is None:
00626             self.lm_lambda=0.001
00627         elif old_chi2 < new_chi2:
00628             if new_chi2/old_chi2 < 1.1:
00629                 self.lm_lambda *=10.0 #on a slightly bad fit (bobbling), don't penalize too badly
00630             else:
00631                 self.lm_lambda = max(self.lm_lambda*10.0, 1.0) #always jump to at least 1 on a bad fit
00632         else:
00633             self.lm_lambda *= 0.1
00634     
    ##


Generated on Wed Nov 21 10:18:32 2007 for analysis by  doxygen 1.5.4