**Chapter
6. **** ****Linear Regression** (.NET, C#, CSharp, VB, Visual Basic, F#)

Class **LinearRegression**
computes a multiple linear regression from an input matrix of independent
variable values (the *predictor matrix*
or *regression matrix*) and a vector
of dependent variable values (the *observation
vector*).

In a linear model, a quantity y
depends on one or more independent variables a_{1}, a_{2},...,a_{n} such that y
= x_{0}
+ x_{1}a_{1} + ... + x_{n}a_{n}. (Parameter x_{0} is called the *intercept parameter*.)
Several observations of the independent values a_{i} are recorded, along with the corresponding
values of the dependent variable y. If m observations are performed, and for the *i*th observation we denote the values of
the independent variables a_{i1}, a_{i2},...,a_{in}_{ }and the corresponding
dependent value of y as y_{i}, then we form the linear system Ax = y, where matrix A =
(a_{ij})
and vector y = (y_{i}). The regression solution is the value of x that minimizes ||Ax - y||.

This chapter describes how to use the **LinearRegression** class, and related supporting
classes.