Visible to Intel only — GUID: GUID-1C543361-55C9-4715-B4C9-DEC857B6B72C
Visible to Intel only — GUID: GUID-1C543361-55C9-4715-B4C9-DEC857B6B72C
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.
Details
Let be a vector of input variables and be the response. For each , the linear regression model has the format [Hastie2009]:
Here , , are referred to as independent variables, and are referred to as dependent variables or responses.
Linear regression is called:
Simple Linear Regression (if there is only one explanatory variable)
Multiple Linear Regression (if the number of explanatory variables )
Training Stage
Let be a set of training data, . The matrix X of size contains observations , , of independent variables.
To estimate the coefficients one these methods can be used:
Normal Equation system
QR matrix decomposition
Prediction Stage
Linear regression based prediction is done for input vector using the equation for each .
Usage of Training Alternative
To build a Linear Regression model using methods of the Model Builder class of Linear Regression, complete the following steps:
Create a Linear Regression model builder using a constructor with the required number of responses and features.
Use the setBeta method to add the set of pre-calculated coefficients to the model. Specify random access iterators to the first and the last element of the set of coefficients [ISO/IEC 14882:2011 §24.2.7]_.
NOTE:If your set of coefficients does not contain an intercept, interceptFlag is automatically set to False, and to True, otherwise.Use the getModel method to get the trained Linear Regression model.
Use the getStatus method to check the status of the model building process. If DAAL_NOTHROW_EXCEPTIONS macros is defined, the status report contains the list of errors that describe the problems API encountered (in case of API runtime failure).
Examples
C++ (CPU)
Java*
Python*