Fit Command

From GeoGebra Manual
Revision as of 12:45, 4 February 2019 by Murkle (talk | contribs) (* If you work with big/small numbers, you should consider normalizing them for a more accurate result, see Normalize Command.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Fit( <List of Points>, <List of Functions> )
Calculates a linear combination of the functions that best fit the points in the list.
Example:
  • Fit({(-2, 3), (0, 1), (2, 1), (2, 3)}, {x^2, x}) yields 0.625 x^2 - 0.25x.
  • Let L = {A, B, C, ...}, f(x) = 1, g(x) = x, h(x) = e^x, F = {f, g, h}.
    Fit(L, F) calculates a function of the form a + b x + c e^x that fits the points in the list.
Fit( <List of points>, <Function> )
Calculates a minimum squared error function to the points in the list. The function must depend on one or more sliders, that are taken as start values of parameters to be optimized. The non-linear iteration might not converge, but adjusting the sliders to a better starting point might help.
Example: Let a be slider with interval from -5 to 5 and increment 1. Fit({(-2, 3), (0, 1), (2, 1), (2, 3)}, a + x^2) yields -1 + x^2.


Note:
© 2024 International GeoGebra Institute