next up previous contents index
Next: Outputs Up: Fitting of Data Previous: External Functions

   
The Fitting Process.

The typical sequence of operations for a FITting process would be first to create the approximating function, to choose relatively to your problem and your needs the FIT options, then to execute the real least squares approximation and finally to store and view the results. This corresponds to the typical sequence of MIDAS instructions :

EDIT/FIT fitname
SET/FIT options
FIT/... nfeval,prec image (or table and cols)
COMPUTE/FIT output

The commands have been designed so that defaults exists for almost all the parameters, (see description in Volume C of the MIDAS User Guide).

EDIT/FIT has been described in the last section.

The MIDAS command SET/FIT is used to specify the different options of the FIT command, for instance the method to be applied or the type of used functions. The instruction

SET/FIT METHOD=CGNND PRINT=1 WEIGHT=S FUNCT=BLACBODY FCTDEF=USER
declares that the Corrected Gauss-Newton no derivatives method is to be applied, that at each iteration, a display of the intermediate result will be performed, that the weighting factors are statistical, that the name of the approximating function is BLACBODY, and that this BLACBODY function which contains user defined functions has already been built in the user area. The appendix or the MIDAS interactive HELP facility will give you the complete description of the SET/FIT command.

The command SHOW/FIT displays the actual selected FIT options.

The FIT instruction is performing the least squares approximation itself. It has a slightly different syntax if the fitting concerns a table or an image.

FIT/TABLE nfeval[,prec,[metpar]] table :depcol[,:wgt] :indcol,...
FIT/IMAGE nfeval[,prec,[metpar]] image

nfeval is the maximum number of function evaluations that can be performed, prec is the precision on the parameters i.e. the program stops if

\begin{displaymath}\Vert a^{(solution)}-a^{(found)}\Vert \le prec~(1+\Vert a^{(found)}\Vert)~~,\end{displaymath}

and metpar are the specific method parameters (for instance in NR : the relaxation factor). The latter have not generally to be given as they can be deduced by the program. For stiff problems, they can thus be overwritten by the user. Any non-given parameter is defaulted. Consult the appendix or use the MIDAS interactive HELP to get a complete description. For instance, the instruction
FIT/IMAGE 100,0.001 PROFILE
executed after the preceeding SET/FIT, will execute a non-linear least squares approximation using the CGNND method. The program will stop if more than 100 computations of the approximating function have been performed or if the solution has been found with a precision of 10-3.


next up previous contents index
Next: Outputs Up: Fitting of Data Previous: External Functions
Petra Nass
1999-06-09