Calibration computations
Concepts and common values
Regression functions
Results are obtained by computing a calibration function, named \(y\), from the analysis points \((x_i,y_i), i=1..N\) (coming from the reference measurements) obtained for a given substance. The Calibration mode (see Substance Table and Height/Area views) can be one of the following:
Linear-1 : linear function through the origin (can be called one-reference calibration when there is only one group of replicas) corresponding to the expression \(y=ax\)
Linear-2 : usual linear function corresponding to the expression \(y=a_1x+a_0\)
Polynomial : second-degree polynomial corresponding to the expression \(y=a_2x^2+a_1x+a_0\)
Mime-1 : Michaelis–Menten function going through the origin, corresponding to the expression \(y=\frac{a_1x}{a_2+x}\)
Mime-2 : Michaelis–Menten function corresponding to the expression \(y=\frac{a_1x}{a_2+x}+a_0\)
Regression range
The calibration function \(y\) is valid only on a regression range. With:
\({x_i}_{min}\) and \({x_i}_{max}\) the minimum and maximum quantities applied on reference points
\(d\) the Range deviation defined in the Substance Table (defined in \(\%\))
The regression range is:
\[\left[max\{0,{x_i}_{min}-\frac{d({x_i}_{max}-{x_i}_{min})}{100}\},{x_i}_{max}+\frac{d({x_i}_{max}-{x_i}_{min})}{100}\right]\]
These functions are (or in Polynomial mode, must be) strictly monotonically increasing on the regression range. Therefore, with \(y=f(x)\), the regression \(x=f^{-1}(y)\) gives 0 or 1 result, depending on if \(x\) belongs to the validity area.
Additional assumptions are made:
By design, the regression functions are valid only if they are strictly growing in the validity area (first derivative must be positive).
The analysis points have always strictly positive coordinates.
Computation of the analysis points
An analysis point corresponds to a peak (see Peaks table) assigned to a given substance (see Substance assignment). The computation can be done using one of the following modes:
Height of the peak: profile value at the 𝑅ꜰ position determined by the peak detection algorithm
Area of the peak on the profile values \((x_p,y_p), p=1..N_p\) where \(x_p∈[P_s,P_e]\) with \(P_s\) and \(P_e\) the start and end 𝑅ꜰ values of the peak determined by the peak detection algorithm. The area value is computed by performing a discrete integration:
\[\frac{1}{2}\sum_{p=1}^{N_p-1}\left((x_{p+1}-x_p)(y_{p+1}+y_p)\right)\]
Coefficient of variation of the calibration function
Formerly known as standard deviation, the coefficient of variation of the calibration function is an expression of the difference between the analysis points and the regression function computed. The result is displayed in percent. The computation only considers the y-axis because the x-axis is error-free by design. With:
\((x_i,y_i), i=1..N\) the analysis points (coming from the reference measurements)
\(y\) the regression function
\(\overline{y}\) the mean of \(y_i\) values
Correlation coefficient of the calibration function
The correlation coefficient (or determination coefficient) is computed by using the general formula, with:
\((x_i,y_i), i=1..N\) the analysis points (coming from the reference measurements)
\(y\) the regression function
\(\overline{y}\) the mean of \(y_i\) values
Coefficient of variation of the sample results
The coefficient of variation is computed by dividing the standard deviation (applied to a sample population, sometimes called the corrected sample standard deviation) by the mean value, with:
\((x_i,y_i), i=1..N\) the analysis points (coming from the reference measurements)
\(\overline{y}\) the mean of \(y_i\) values
Computation of the calibration functions
Linear-1
Calibration function
Recall of the general formula:
To compute \(a\), we consider that \(y\) goes through the center of gravity of the analysis points, noted \(\left( \overline{x} , \overline{y} \right)\) so that:
Provided that analysis points have always positive coordinates, we can state that \(a>0\). The calibration function is therefore strictly growing and strictly positive when \(x>0\) and is therefore always valid.
Regression
The inversion of \(\eqref{eq1}\) is straightforward:
Linear-2
Calibration function
With the general formula:
The linear regression is performed by using the well-known method of the least squares. With:
\((x_i,y_i), i=1..N\) the analysis points (coming from the reference measurements)
\(\hat{y}\) the best linear function for the given analysis points (the function searched)
The square differences are given by the following formula:
\(S_y\) is a function of \(a_0\) and \(a_1\) and is a sum of squares (\(\eqref{eq4}\)), whose minimum is obtained when the first derivatives are 0:
The computation of solutions (isolation and replacement) for these equations leads to:
Note
The calibration function is valid only if \(a_1>0\)
Regression
The inversion of \(\eqref{eq2}\) gives:
Polynomial
Calibration function
The process is similar to Linear-2, but extended to a second-degree polynomial:
The square differences function is defined the same way, which gives:
Again, the first derivatives are 0 at the minimum:
Or, in matrix form:
Then in condensed form:
With \(X^{-1}\) the inversion of the matrix \(X\).
Regression
By design, the second-degree polynomial function is valid only when \(a_2<0\) (decreasing acceleration assumption, or \(y''(x)<0\)), and only on the increasing side of the curve, when \(y'(x)>0\), that is, when \(x>-\frac{a_1}{2a_2}\).
The inversion of \(\eqref{eq3}\) is performed by resolving the equation:
The resolution usually gives 2 solutions, but at most 1 solution can be on the validity range.
Mime-1 and Mime-2
Principles
The Mime regression algorithms are based on saturation functions characterized by the formula:
The algorithm is called Mime-1 when the assumption \(a_0=0\) (the function goes through the origin) is made, otherwise it’s called Mime-2. For both modes, it is expected that \(a_2>0\), so that the denominator is always positive when \(x>0\). Otherwise the algorithm diverges and the regression is considered not successful.
Unlike polynomial functions, the best saturation function for a given set of points can’t be directly estimated by using standard algebra. Consequently, the estimation is obtained by computing a starting set of values \(a_0^{'}\), \(a_1^{'}\) and \(a_2^{'}\) and then by using Taylor series, starting from the general formula:
By applying the expansion for \(\hat{y}\):
With \(a=x-\delta\):
By performing the expansion for \(\hat{y}(x+a)\):
In our case, our \(\hat{y}\) saturation function will be estimated by:
Using \(a_0\), \(a_1\) and \(a_2\) as variables to expand.
Using the source points \((x_i,y_i ), i=1..N\) to minimize the square differences. Therefore, the \(x\) variable stays in the following equation.
Restricting the expansion to the 1st level.
The minimization of square differences applied to this equation gives a value for \(\delta_{a_0}\), \(\delta_{a_1}\) and \(\delta_{a_2}\). These values are used to refine the values of \(a_0\), \(a_4\) and \(a_2\), and the process can be applied until a sufficient degree of precision is reached. The following sections describe the way the starting values are computed, and then how the iterative process is conducted.
Starting point
Mime-1
The Mime-1 function:
Can be inversed:
We can simplify the computation by setting \(b_0\) and \(b_1\) as follows:
With:
We can now compute \(b_0\) and \(b_1\) by reusing the linear regression formula \(\eqref{eq4}\):
With the help of the same differential equations but this time for \(b_0\) and \(b_1\):
Or, in matrix form:
Then in condensed form:
With \(X^{-1}\) the inversion of the matrix \(X\). With the values of \(b_0\) and \(b_1\), \(a_0\) and \(a_1\) can then be obtained.
Mime-2
The starting value for Mime-2 is itself computed by an iterative process. Indeed, a direct evaluation by minimizing the square differences and using partial derivations is not suitable. Each iteration consists in fixing 2 values for \(a_2\), named \(a_{2d}\) and \(a_{2u}\), that will evolve during the process in the interval \([a_{2_{down}},a_{2_{up}}]\). It makes sense to define the following limits:
And to set the initial values of \(a_{2_{down}}\) and \(a_{2_{up}}\) to:
With \(\epsilon\) a value that tends to be 0. In a computer program, this value is set to the smallest positive value available. In each iteration is also defined:
And:
The goal is now to compute \(S(a_0,a_1,a_{2d})\) and \(S(a_0,a_1,a_{2u})\) by applying the square differences equation \(\eqref{eq4}\) to the Mime-2 function \(\eqref{eq5}\):
With the help of the same differential equations but this time for \(a_0\) and \(a_1\) only:
Or, in matrix form:
Then in condensed form:
With \(X^{-1}\) the inversion of the matrix \(X\). By replacing \(a_2\) with respectively \(a_{2d}\) and \(a_{2u}\) in the last equation, we get in the 2 situations the corresponding values for \(a_0\) and \(a_1\). By naming those values \(a_{0d}\) and \(a_{1d}\) for \(a_{2d}\) and respectively \(a_{0u}\) and \(a_{1u}\) for \(a_{2u}\), we can use \(\eqref{eq6}\) to get \(S(a_{0d},a_{1d},a_{2d})\) and \(S(a_{0u},a_{1u},a_{2u})\). These values measure the deviation between the corresponding Mime-2 function and the analysis points. Therefore, when \(S(a_{0u},a_{1u},a_{2u})>S(a_{0d},a_{1d},a_{2d})\) we reduce \(a_{2_{up}}\) by \(d_{a_2}\), else we increase \(a_{2_{down}}\) by \(d_{a_2}\). Iterations are then repeated until \(d_{a_2}<0.001\). It has to be noted that the process does not always converge to 0. Therefore the process should be stopped after a fixed number of iterations or when the value for \(d_{a_2}\) exceeds what the computer program can accept.
Note
In visionCATS, the process is stopped after 25 iterations.
Calibration function
Mime-1
The way to get the starting values for \(a_1\) and \(a_2\) is described in section Starting point. The process is then iterative and consists in finding \(\delta_{a_1}\) and \(\delta_{a_2}\) in the equation \(\eqref{eq7}\) for Mime-1 reduced to 1st expansion:
By using the minimization of square differences \(\eqref{eq4}\) with the last equation:
Apply a partial derivation for \(\delta_{a_1}\) and \(\delta_{a_2}\):
Or, in matrix form:
Then in condensed form:
With \(X^{-1}\) the inversion of the matrix \(X\). The values obtained for \(\delta_{a_1}\) and \(\delta_{a_2}\) are an approximation of the value that should be added respectively to \(a_1\) and \(a_2\) in order for the square differences between the Mime-1 function and the analysis points to be minimal. Therefore, take respectively \(a_1+\delta_{a_1}\) and \(a_2+\delta_{a_2}\) as new values \(a_1\) and \(a_2\), and repeat iterations until:
It has to be noted that the process does not always converge to 0. Therefore, the process should be stopped after a fixed number of iterations or when the value for \(\delta_a\) exceeds what the computer program can accept.
Note
In visionCATS, the process is stopped after 25 iterations.
Mime-2
The Mime-2 regression uses the same process as the Mime-1 regression. Based on the 1st level expansion \(\eqref{eq7}\), with the minimization of the square differences:
Apply a partial derivation for \(\delta_{a_0}\), \(\delta_{a_1}\) and \(\delta_{a_2}\) (already simplified by removing the 2 factors):
Note
In the following expressions, \(\sum_{i=1}^{N}\) has been simplified to \(\sum\) for clarity purposes.
Or, in matrix form:
Then in condensed form:
With \(X^{-1}\) the inversion of the matrix \(X\). The values obtained for \(\delta_{a_0}\), \(\delta_{a_1}\) and \(\delta_{a_2}\) are an approximation of the value that should be added respectively to \(a_0\), \(a_1\) and \(a_2\) in order for the square differences between the Mime-2 function and the analysis points to be minimal. Therefore, take respectively \(a_0+\delta_{a_0}\), \(a_1+\delta_{a_1}\) and \(a_2+\delta_{a_2}\) as new values \(a_0\), \(a_1\) and \(a_2\), and repeat iterations until:
It has to be noted that the process does not always converge to 0. Therefore, the process should be stopped after a fixed number of iterations or when the value for \(\delta_a\) exceeds what the computer program can accept.
Note
In visionCATS, the process is stopped after 25 iterations.
Regression
The inversion of \(\eqref{eq5}\) for Mime-1 gives:
The inversion of \(\eqref{eq5}\) for Mime-2 gives: