Linear Regression¶
Global Algorithm - One-Dimensional Algorithm
Linear Regression algorithm aims to find parameters p0 and p1 for a line, y=p0+p1⋅t, that best fits N data points. The task is equivalent to solve systems of linear equations
Ap=[1t11t2⋮⋮1tN][p0p1]=[y1y2⋮yN]=Y.
The method of least squares is the most common method for finding the fitted parameters. If A is of full column rank, the least squares solution is
p=(ATA)−1ATY
Input Parameters
Parameter | Type | Constraint | Description | Remarks |
---|---|---|---|---|
[ti] | [ti]∈RN | N∈N | ||
Y | Y∈RN | N∈N | Input data vector of length N |
Output Parameters
Parameter | Type | Constraint | Description | Remarks |
---|---|---|---|---|
p | p∈R2 | |||
ˆY | ˆY∈RN | N∈N | Output data vector of length N |
Tool Support
-
For details refer to the online documentation of the function ‘LinearFit’.
-
For details refer to the online documentation of the function ‘polyfit’.
Single Steps using the Algorithm
References
- C.R. Rao, H. Toutenburg, A. Fieger, C. Heumann, T. Nittner and S. Scheid, Linear Models: Least Squares and Alternatives, Springer Series in Statistics, pp. 23-33, 1999.
- R.C. Aster, B. Borchers, C.H. Thurber, Parameter Estimation and Inverse Problems, Academic Press, 2005.