Linear Regression Task

Jump to navigation Jump to search

A Linear Regression Task is a regression analysis task that is based on linear predictor functions.

$\displaystyle{ y_i=f(x_i,\boldsymbol\beta)+\varepsilon_i\quad }$ with $\displaystyle{ f(x_i,\beta_j )=\sum _{j=0}^{m}\beta _{j}\phi_{j}(x_i) }$ for $\displaystyle{ \quad i=1,\cdots,n \; }$ and $\displaystyle{ j=0,\cdots, p }$
in this regression function $\displaystyle{ f(X)=f(x_i,\boldsymbol\beta) }$ is a parametric regression function which is a linear combination between $\displaystyle{ p }$ regression coefficients $\displaystyle{ \beta_j }$ (parameters) and basis functions $\displaystyle{ \phi_j(x_i) }$. Usually, the basis function are polynomial, i.e. $\displaystyle{ \phi_j(x^i)=x_i^{j} }$
or
$\displaystyle{ \mathbf{Y} = \mathbf{X}\mathbf{B} + \mathbf{U}, }$ where $\displaystyle{ \mathbf{Y}=y_i }$ is the measurement matrix, $\displaystyle{ \mathbf{X}=\phi _{j}(x_i) }$ is design matrix, $\displaystyle{ \mathbf{B}=\boldsymbol{\beta}=\beta_j }$ the parameters matrix and $\displaystyle{ \mathbf{U}=\varepsilon_i }$ a errors matrix. This is,

$\displaystyle{ \begin{pmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{pmatrix} = \begin{pmatrix} \phi_0(x_1) & \phi_1(x_1) & \cdots & \phi_p(x_1) \\ \phi_0(x_2) & \phi_1(x_2) & \cdots & \phi_p{x_2} \\ \vdots & \vdots & \ddots & \vdots \\ \phi_0(x_n) & \phi_1(x_n) & \cdots & \phi_p(x_n) \end{pmatrix}\begin{pmatrix} \beta_0 \\ \beta_1 \\ \vdots \\ \beta_p \end{pmatrix}+\begin{pmatrix} \varepsilon_1 \\ \varepsilon_2 \\ \vdots \\ \varepsilon_n \end{pmatrix} }$

by estimating the best-fitting $\displaystyle{ \beta }$ parameters that optimizes the following objective function:

$\displaystyle{ E(f)=\sum _{i=1}^{n}L(y_{i},f(x_{i},{\boldsymbol \beta })) }$

$\displaystyle{ L(\cdot) }$ is an error function that may be derived as a loss function or the negative of a likelihood function.

• Example(s):
• A numerical experiment resulted in the four $\displaystyle{ (x, y) }$ data points $\displaystyle{ {(1, 6), (2, 5), (3, 7), (4, 10)} }$, find a line $\displaystyle{ y=\beta_1+\beta_2 x }$ that best fits these four points
e.g. ⇒ $\displaystyle{ y=3.5+1.4x }$.
• A Simple Linear Regression Task: $\displaystyle{ y_i=\beta_0+\beta_1 x_i+\varepsilon_i,\quad i=1,\cdots ,n\; }$,

$\displaystyle{ \begin{pmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{pmatrix} = \begin{pmatrix} 1 & x_1 \\ 1 & x_2 \\ \vdots & \vdots\\ 1 & x_n \\ \end{pmatrix}\begin{pmatrix} \beta_0 \\ \beta_1 \\ \end{pmatrix}+\begin{pmatrix} \varepsilon_0 \\ \varepsilon_1 \\ \vdots \\ \varepsilon_n \end{pmatrix} }$

• The regression problem: $\displaystyle{ y_i=\beta_0+\beta_1 x_i+\beta_2x_i^2+\varepsilon_i,\quad i=1,\cdots ,n\; }$,

$\displaystyle{ \begin{pmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{pmatrix} = \begin{pmatrix} 1 & x_1&x_1^2\\ 1 & x_2&x_2^2 \\ \vdots & \vdots&\vdots\\ 1 & x_n&x_n^2 \\ \end{pmatrix}\begin{pmatrix} \beta_0 \\ \beta_1 \\ \beta_2\\ \end{pmatrix}+\begin{pmatrix} \varepsilon_0 \\ \varepsilon_1 \\ \vdots \\ \varepsilon_n \end{pmatrix} }$

Although, it includes a quadratic term, this is still linear in the regression parameters.

• A Multivariate Linear Regression Task.
• A Regularized Linear Regression Task.
• A Linear Least-Squares Regression Task.
• Counter-Example(s):
• See: Curve Fitting, System of Linear Equations, Linear Model.

References

2014

• (Wikipedia, 2014) ⇒ http://en.wikipedia.org/wiki/linear_regression Retrieved:2014-11-23.
• In statistics, linear regression is an approach for modeling the relationship between a scalar dependent variable y and one or more explanatory variables denoted X. The case of one explanatory variable is called simple linear regression. For more than one explanatory variable, the process is called multiple linear regression. (This term should be distinguished from multivariate linear regression, where multiple correlated dependent variables are predicted,rather than a single scalar variable.)

In linear regression, data are modeled using linear predictor functions, and unknown model parameters are estimated from the data. Such models are called linear models. Most commonly, linear regression refers to a model in which the conditional mean of y given the value of X is an affine function of X. Less commonly, linear regression could refer to a model in which the median, or some other quantile of the conditional distribution of y given X is expressed as a linear function of X. Like all forms of regression analysis, linear regression focuses on the conditional probability distribution of y given X, rather than on the joint probability distribution of y and X, which is the domain of multivariate analysis.

Linear regression was the first type of regression analysis to be studied rigorously, and to be used extensively in practical applications. This is because models which depend linearly on their unknown parameters are easier to fit than models which are non-linearly related to their parameters and because the statistical properties of the resulting estimators are easier to determine.

Linear regression has many practical uses. Most applications fall into one of the following two broad categories:

• If the goal is prediction, or forecasting, or reduction, linear regression can be used to fit a predictive model to an observed data set of y and X values. After developing such a model, if an additional value of X is then given without its accompanying value of y, the fitted model can be used to make a prediction of the value of y.
• Given a variable y and a number of variables X1, ..., Xp that may be related to y, linear regression analysis can be applied to quantify the strength of the relationship between y and the Xj, to assess which Xj may have no relationship with y at all, and to identify which subsets of the Xj contain redundant information about y.
• Linear regression models are often fitted using the least squares approach, but they may also be fitted in other ways, such as by minimizing the "lack of fit" in some other norm (as with least absolute deviations regression), or by minimizing a penalized version of the least squares loss function as in ridge regression (L2-norm penalty) and lasso (L1-norm penalty). Conversely, the least squares approach can be used to fit models that are not linear models. Thus, although the terms "least squares" and "linear model" are closely linked, they are not synonymous.