Visible to Intel only — GUID: GUID-F83C1E6A-8EA4-4570-83F5-64F30550F6CA
Visible to Intel only — GUID: GUID-F83C1E6A-8EA4-4570-83F5-64F30550F6CA
Linear and Ridge Regressions Computation
Batch Processing
Linear and ridge regressions in the batch processing mode follow the general workflow described in Regression Usage Model.
Training
For a description of the input and output, refer to Regression Usage Model.
The following table lists parameters of linear and ridge regressions at the training stage. Some of these parameters or their values are specific to a linear or ridge regression algorithm.
Linear Regression
Parameter |
Default Value |
Description |
---|---|---|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Available methods for linear regression training:
|
interceptFlag |
true |
A flag that indicates a need to compute . |
Ridge Regression
Parameter |
Default Value |
Description |
---|---|---|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Default computation method used by the ridge regression. The only method supported at the training stage is the normal equations method. |
ridgeParameters |
A numeric table of size that contains the default ridge parameter equal to 1. |
The numeric table of size (k is the number of dependent variables) or . The contents of the table depend on its size:
NOTE:
This parameter can be an object of any class derived from NumericTable, except for PackedTriangularMatrix, PackedSymmetricMatrix, and CSRNumericTable.
|
interceptFlag |
true |
A flag that indicates a need to compute . |
Prediction
For a description of the input and output, refer to Regression Usage Model.
At the prediction stage, linear and ridge regressions have the following parameters:
Parameter |
Default Value |
Description |
---|---|---|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Default performance-oriented computation method, the only method supported by the regression based prediction. |
Online Processing
You can use linear and ridge regression in the online processing mode only at the training stage.
This computation mode assumes that the data arrives in blocks .
Training
Linear and ridge regression training in the online processing mode follows the general workflow described in Regression Usage Model.
Linear and ridge regression training in the online processing mode accepts the input described below. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.
Input ID |
Input |
---|---|
data |
Pointer to the numeric table that represents the current, i-th, data block. |
dependentVariables |
Pointer to the numeric table with responses associated with the current, i-th, data block. |
The following table lists parameters of linear and ridge regressions at the training stage in the online processing mode.
Linear Regression
Parameter |
Default Value |
Description |
---|---|---|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Available methods for linear regression training:
|
interceptFlag |
true |
A flag that indicates a need to compute . |
Ridge Regression
Parameter |
Default Value |
Description |
---|---|---|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Default computation method used by the ridge regression. The only method supported at the training stage is the normal equations method. |
ridgeParameters |
A numeric table of size that contains the default ridge parameter equal to 1. |
The numeric table of size (k is the number of dependent variables) or . The contents of the table depend on its size:
NOTE:
This parameter can be an object of any class derived from NumericTable, except for PackedTriangularMatrix, PackedSymmetricMatrix, and CSRNumericTable.
|
interceptFlag |
true |
A flag that indicates a need to compute . |
For a description of the output, refer to Regression Usage Model.
Distributed Processing
You can use linear and ridge regression in the distributed processing mode only at the training stage.
This computation mode assumes that the data set is split in nblocks blocks across computation nodes.
Training
Use the two-step computation schema for linear and ridge regression training in the distributed processing mode, as illustrated below:
Algorithm parameters
The following table lists parameters of linear and ridge regressions at the training stage in the distributed processing mode.
Linear Regression
Parameter |
Default Value |
Description |
---|---|---|
computeStep |
Not applicable |
The parameter required to initialize the algorithm. Can be:
|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Available methods for linear regression training:
|
interceptFlag |
true |
A flag that indicates a need to compute . |
Ridge Regression
Parameter |
Default Value |
Description |
---|---|---|
computeStep |
Not applicable |
The parameter required to initialize the algorithm. Can be:
|
algorithmFPType |
float |
The floating-point type that the algorithm uses for intermediate computations. Can be float or double. |
method |
defaultDense |
Default computation method used by the ridge regression. The only method supported at the training stage is the normal equations method. |
ridgeParameters |
A numeric table of size that contains the default ridge parameter equal to 1. |
The numeric table of size (k is the number of dependent variables) or . The contents of the table depend on its size:
NOTE:
This parameter can be an object of any class derived from NumericTable, except for PackedTriangularMatrix, PackedSymmetricMatrix, and CSRNumericTable.
|
interceptFlag |
true |
A flag that indicates a need to compute . |
Step 1 - on Local Nodes
In this step, linear and ridge regression training accepts the input described below. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.
Input ID |
Input |
---|---|
data |
Pointer to the numeric table that represents the i-th data block on the local node. |
dependentVariables |
Pointer to the numeric table with responses associated with the i-th data block. |
In this step, linear and ridge regression training calculates the result described below. Pass the Result ID as a parameter to the methods that access the results of your algorithm. For more details, see Algorithms.
Result ID |
Result |
---|---|
partialModel |
Pointer to the partial linear regression model that corresponds to the i-th data block. The result can only be an object of the Model class. |
Step 2 - on Master Node
In this step, linear and ridge regression training accepts the input described below. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.
Input ID |
Input |
---|---|
partialModels |
A collection of partial models computed on local nodes in Step 1. The collection contains objects of the Model class. |
In this step, linear and ridge regression training calculates the result described below. Pass the Result ID as a parameter to the methods that access the results of your algorithm. For more details, see Algorithms.
Result ID |
Result |
---|---|
model |
Pointer to the linear or ridge regression model being trained. The result can only be an object of the Model class. |
Examples
C++ (CPU)
Batch Processing:
Online Processing:
Distributed Processing:
Java*
Batch Processing:
Online Processing:
Distributed Processing:
Python* with DPC++ support
Batch Processing:
Python*
Batch Processing:
Online Processing:
Distributed Processing: