[ sedfit help home ]
Fit (keyboard shortcut ctrl-F)
This function performs non-linear regression of all the parameters that have been marked to be floated (see parameters). As always in non-linear regression, good starting guesses are essential (for the nonlinear parameters). Therefore, before executing the fit command, it is essential that parameter estimates are entered into the parameter box. It is best to use the Run command first to simulate the sedimentation with these starting guesses, and if necessary, improve them manually.
The fitting strategy implemented in Sedfit is the simplex procedure. Although this is not always the most efficient approach, it is known to be very stable. Starting from the initial parameter estimates, a set of random variations of the parameters are generated. The sum of squared residuals is calculated for each of the variations, and the simplex algorithm performs a series of optimization steps, in each of which the worst parameter set is eliminated and a better one is introduced. The algorithm is known to be susceptible to 'circling' the optimum, i.e. it can get trapped in a path of parameter values close to the optimum without converging. As convergence criterion, the sum of squared residuals and all of the parameters have to be within the pre-determined Tolerance (in %) value (see parameter box). After convergence, the simplex is repeatedly restarted (using randomly selected variations around the previously found optimal values), until the parameters and the rmsd value are within the tolerance. Two consecutive simplex procedures are required to converge to the same rmsd and to the same parameter values for the fit to stop. After the simplex has converged, Sedfit will beep.
If a nonlinear regression is not required because only linear parameters are floated, the Fit command only consists of a single simulation, and is identical to the Run command.
The text output during the fitting procedure shows the number of simulations of the sedimentation process in the first line ("sim#..."), and the simplex number, the simplex step # and the finite element gridsize in the second line (e.g. "s2, step#20, gridsize = 1000"). The remaining lines show the rmsd and the parameter values from the current simulation. The last line shows a Runs test of the residuals from the current simulation.
Convergence can be observed if the rmsd value does change only very little, and when the parameter values stay virtually the same. As a minimum, 2 simplex procedures are required for Sedfit to stop. If the simplex routine does get trapped in a path around the optimum, the fit can be interrupted by hitting the space bar ONCE during the simulation of sedimentation. After interrupting the fit, the sedimentation with the so far best-fit parameters will be simulated. Do not interrupt this final simulation, as this may result in loss of the best-fit parameters.
Please Note: The fitting procedure will store temporary best-fit parameters in the file ~tmppars.* (in the data directory, with the same extension as the data files) to allow restoring the analysis in case of a crash of the program. Sometimes, the cause of the crash is a floating parameter that does not influence the quality of the fit, and therefore can assume an unlimited number, causing the crash. In this case, when reloading the data, the attempt to restore the fit will fail. However, the tmppars file can be edited with the notepad, and the parameter with the very large number can be set to 1.000000 (see FAQs).
This tmppars file can be copied to a different directory and renamed for a convenient way to store results of a fit.