01.02.2014 Views

GNUPlot Manual

GNUPlot Manual

GNUPlot Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

34 gnuplot 4.0 22 FIT<br />

22.4 Fit controlling<br />

There are a number of gnuplot variables that can be defined to affect fit. Those which can be defined<br />

once gnuplot is running are listed under ’control variables’ while those defined before starting gnuplot<br />

are listed under ’environment variables’.<br />

22.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 gnuplot 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. 34).<br />

22.4.2 Environment variables<br />

The environment variables must be defined before gnuplot 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 fitlogfile.<br />

FIT_SCRIPT<br />

specifies a command that may be executed after an user interrupt. The default is replot, but a plot or<br />

load command may be useful to display a plot customized to highlight the progress of the fit.<br />

22.5 Multi-branch<br />

In multi-branch fitting, multiple data sets can be simultaneously fit with functions of one independent<br />

variable having common parameters by minimizing the total WSSR. The function and parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!