gnuplot documentation
gnuplot documentation
gnuplot documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
53 FIT <strong>gnuplot</strong> 4.3 59<br />
the statistical assumptions may not be justified, or the model function may be too general, fitting<br />
fluctuations in a particular sample in addition to the underlying trends. In the latter case, a simpler<br />
function may be more appropriate.<br />
You’ll have to get used to both fit and the kind of problems you apply it to before you can relate the<br />
standard errors to some more practical estimates of parameter uncertainties or evaluate the significance<br />
of the correlation matrix.<br />
Note that fit, in common with most NLLS implementations, minimizes the weighted sum of squared<br />
distances (y-f(x))**2. It does not provide any means to account for "errors" in the values of x, only in y.<br />
Also, any "outliers" (data points outside the normal distribution of the model) will have an exaggerated<br />
effect on the solution.<br />
53.4 Control<br />
There are a number of <strong>gnuplot</strong> variables that can be defined to affect fit. Those which can be defined<br />
once <strong>gnuplot</strong> is running are listed under ’control variables’ while those defined before starting <strong>gnuplot</strong><br />
are listed under ’environment variables’.<br />
53.4.1 Control variables<br />
The default epsilon limit (1e-5) may be changed by declaring a value for<br />
FIT_LIMIT<br />
When the sum of squared residuals changes between two iteration steps by a factor less than this number<br />
(epsilon), the fit is considered to have ’converged’.<br />
The maximum number of iterations may be limited by declaring a value for<br />
FIT_MAXITER<br />
A value of 0 (or not defining it at all) means that there is no limit.<br />
If you need even more control about the algorithm, and know the Marquardt-Levenberg algorithm well,<br />
there are some more variables to influence it. The startup value of lambda is normally calculated<br />
automatically from the ML-matrix, but if you want to, you may provide your own one with<br />
FIT_START_LAMBDA<br />
Specifying FIT START LAMBDA as zero or less will re-enable the automatic selection. The variable<br />
FIT_LAMBDA_FACTOR<br />
gives the factor by which lambda is increased or decreased whenever the chi-squared target function<br />
increased or decreased significantly. Setting FIT LAMBDA FACTOR to zero re-enables the default<br />
factor of 10.0.<br />
Other variables with the FIT<br />
user-defined variables.<br />
prefix may be added to fit, so it is safer not to use that prefix for<br />
The variables FIT SKIP and FIT INDEX were used by earlier releases of <strong>gnuplot</strong> with a ’fit’ patch<br />
called gnufit and are no longer available. The datafile every modifier provides the functionality of<br />
FIT SKIP. FIT INDEX was used for multi-branch fitting, but multi-branch fitting of one independent<br />
variable is now done as a pseudo-3D fit in which the second independent variable and using are used to<br />
specify the branch. See fit multi-branch (p. 60).<br />
53.4.2 Environment variables<br />
The environment variables must be defined before <strong>gnuplot</strong> is executed; how to do so depends on your<br />
operating system.<br />
FIT_LOG<br />
changes the name (and/or path) of the file to which the fit log will be written from the default of "fit.log"<br />
in the working directory. The default value can be overwritten using the command set fit logfile.