This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
fit_formulas [Wed Feb 23 16:29:49 2011] Alexander created |
fit_formulas [Tue May 30 16:28:13 2017] (current) Alexander |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Fitting Algorithm and Computational Formulas ====== | ====== Fitting Algorithm and Computational Formulas ====== | ||
- | MagicPlot uses iterative [[wp> | + | MagicPlot uses iterative [[wp> |
+ | MagicPlot implementation of Levenberg–Marquardt algorithm is optimised for using with multi-core processors. MagicPlot successfully passed testing with NIST Nonlinear Regression datasets (see our [[http:// | ||
+ | |||
+ | ===== Nonlinear Least Squares Algorithm | ||
Fit procedure iteratively varies the parameters // | Fit procedure iteratively varies the parameters // | ||
Line 12: | Line 15: | ||
* //f//(//x, β< | * //f//(//x, β< | ||
* //p// is the number of fit parameters // | * //p// is the number of fit parameters // | ||
- | * // | + | * // |
- | < | + | An initial guess for the parameters has to be provided to start minimization. |
- | + | ||
- | Calculation of the new guess of parameters on each fit iteration is based on the fit function partial derivatives for current values of fit parameters | + | |
< | < | ||
- | To start minimization, | + | Partial derivatives are computed using explicit formulas (for some predefined fit functions) or with finite difference (for custom equations). |
===== Weighting of Data Points Using Y Errors ===== | ===== Weighting of Data Points Using Y Errors ===== | ||
MagicPlot can use weighting of //y// values based on y errors // | MagicPlot can use weighting of //y// values based on y errors // | ||
- | * If standard //y// errors are **not** specified: all // | ||
- | * If standard //y// errors // | ||
- | <m>w_i=C 1/{{s_i}^2}</m> | + | * If standard //y// errors //s<sub>i</ |
- | + | * Otherwise: all //w<sub>i</sub>// = 1. | |
- | here //C// is normalizing coefficient | + | |
- | + | ||
- | <m>C=sum{i=1}{N}{{s_i}^2}</m> | + | |
In '' | In '' | ||
Line 38: | Line 34: | ||
* Fixed value or Standard deviation --- do not use in weighting because in this case the error values are the same for all data points. | * Fixed value or Standard deviation --- do not use in weighting because in this case the error values are the same for all data points. | ||
- | ===== Fit Procedure | + | ===== Iterations |
After each iteration except the first MagicPlot evaluates //deviation decrement D//: | After each iteration except the first MagicPlot evaluates //deviation decrement D//: | ||
Line 46: | Line 42: | ||
The iterative fit procedure stops on one of two conditions: | The iterative fit procedure stops on one of two conditions: | ||
- | * If the deviation | + | * If the deviation |
- | or (and) | + | |
* If the number of iterations exceeds maximum number of iterations, which is 100 by default | * If the number of iterations exceeds maximum number of iterations, which is 100 by default | ||
- | You can change the minimum allowable deviation decrement and maximum number of iterations in Fitting tab of MagicPlot Preferences. | + | You can change the minimum allowable deviation decrement and maximum number of iterations in '' |
- | ===== Formulas ===== | + | ===== Formulas |
In the table below you can find the formulas which MagicPlot uses to calculate fit parameters and values in '' | In the table below you can find the formulas which MagicPlot uses to calculate fit parameters and values in '' | ||
Because of some confusion in the names of the parameters in different sources (books and software), we also give many different names of same parameter in //note// column. | Because of some confusion in the names of the parameters in different sources (books and software), we also give many different names of same parameter in //note// column. | ||
+ | |< 100% 15% 10% 45% 30% >| | ||
^ Parameter Name ^ Symbol | ^ Parameter Name ^ Symbol | ||
^ Original Data and Fit Model Properties | ^ Original Data and Fit Model Properties | ||
- | | Number of used data points | + | | Number of used data points |
- | | Fit parameters | + | | Fit parameters |
- | | Number of fit function parameters //β// | < | + | | Number of fit function parameters //β// | < |
| [[wp> | | [[wp> | ||
| Estimated mean of data | < | | Estimated mean of data | < | ||
| Estimated variance of data | < | | Estimated variance of data | < | ||
- | | Data total sum of squares, TSS | TSS | < | + | | Data total sum of squares |
^ Fit Result | ^ Fit Result | ||
- | | Residual sum of squares, < | + | | Residual sum of squares |
- | | Reduced // | + | | Reduced // |
- | | Residual | + | | Residual |
| [[wp> | | [[wp> | ||
- | | Adjusted // | + | | Adjusted // |
- | | Covariance | + | | Covariance |
- | | Standard | + | | Standard |
- | | Correlation | + | | Correlation |
- | + | ||
+ | ===== See Also ===== | ||
+ | * [[fitting]] | ||
+ | * [[custom_fit_equation]] | ||
+ | * [[spline]] | ||
+ | * [[joining]] | ||
+ | * [[guess_peaks]] | ||
+ | * [[fit_equations]] | ||
+ | * [[interval_statistics]] |