Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


finds numerical values of the parameters pars that make expr give a best fit to data as a function of vars.

finds a best fit subject to the parameter constraints cons.

Details and OptionsDetails and Options

  • The data can have the form , where the number of coordinates x, y, is equal to the number of variables in the list vars.
  • The data can also be of the form , with a single coordinate assumed to take values , , .
  • FindFit returns a list of replacements for , , .
  • The expression expr must yield a numerical value when pars and vars are all numerical.
  • The expression expr can depend either linearly or nonlinearly on the .
  • In the linear case, FindFit finds a globally optimal fit.
  • In the nonlinear case, it finds in general only a locally optimal fit.
  • FindFit[data,expr,{{par1,p1},{par2,p2},},vars] starts the search for a fit with .
  • FindFit by default finds a leastsquares fit.
  • The option NormFunction->f specifies that the norm should be minimized.
  • The constraints cons can contain equations, inequalities or logical combinations of these.
  • The following options can be given:
  • AccuracyGoalAutomaticthe accuracy sought
    EvaluationMonitorNoneexpression to evaluate whenever expr is evaluated
    GradientAutomaticthe list of gradient components for expr
    MaxIterationsAutomaticmaximum number of iterations to use
    MethodAutomaticmethod to use
    NormFunctionNormthe norm to minimize
    PrecisionGoalAutomaticthe precision sought
    StepMonitorNoneexpression to evaluate whenever a step is taken
    WorkingPrecisionAutomaticthe precision used in internal computations
  • The default settings for AccuracyGoal and PrecisionGoal are WorkingPrecision/2.
  • The settings for AccuracyGoal and PrecisionGoal specify the number of digits to seek in both the values of the parameters returned, and the value of the NormFunction.
  • FindFit continues until either of the goals specified by AccuracyGoal or PrecisionGoal is achieved.
  • Possible settings for Method include , , , , , and , with the default being Automatic.
Introduced in 2003
| Updated in 2007