Developer Guide

Contents

Linear Regression

Linear regression is a method for modeling the relationship between a dependent variable (which may be a vector) and one or more explanatory variables by fitting linear equations to observed data. The case of one explanatory variable is called Simple Linear Regression. For several explanatory variables the method is called Multiple Linear Regression.

Details

Let (
x
1
,…,
x
p
) be a vector of input variables and y=(
y
1
,…,
y
k
) be the response. For each
j
=1,…,
k,
the linear regression model has the format [Hastie2009]:
y
j
=
β
0
j
+
β
1
j
x
1
+...+
β
pj
x
p
Here
x
i
,
i
=1,...,
p
, are referred to as independent variables, and
y
j
are referred to as dependent variables or responses.
The linear regression is multiple if the number of input variables
p
> 1.
Training Stage
Let (
x
11
,...,
x
1
p
,
y
1
),…,(
x
n
1
,...,
x
np
,
y
n
) be a set of training data,
n
>>
p
. The matrix
X
of size
n
x
p
contains observations
x
ij
,
i
=1,...,n,
j
=1,….,
p
, of independent variables.
To estimate the coefficients (
β
0
j
,...,
β
pj
) one these methods can be used:
  • Normal Equation system
  • QR matrix decomposition
Prediction Stage
Linear regression based prediction is done for input vector (
x
1
,…,
x
p
) using the equation
y
j
=
β
0
j
+
β
1
j
x
1
+...+
β
pj
x
p
for each
j
=1,…,
k
.

Training Alternative

If you already have a set of pre-calculated coefficients {
β
ij
}, you can use the Model Builder class to get a trained Intel DAAL Linear Regression model with these coefficients. After the model is built, you can proceed to the prediction stage.
The set of pre-calculated coefficients should contain
K
vectors
β
i
, where
K
is the number of responses. Each vector
β
i
should be either of dimension
p
+1 (for vectors that include an intercept) or of dimension
p
otherwise, where
p
is the number of features. Note that the intercept value is stored as the zeroth component of
β
i
.
For general information on using the Model Builder class, see Training and Prediction. For details on using the Model Builder class for Linear Regression, see Usage of training alternative.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804