Linear Regression

Linear regression is a method to model the connection between a dependent variable, which can be a vector, and one or more explanatory variables. This is done by fitting the linear equations to the observed data.

Operation

Computational methods

Programming Interface

Training

norm_eq

train(…)

train_input

train_result

Inference

norm_eq

infer(…)

infer_input

infer_result

Partial Training

norm_eq

partial_train(…)

partial_train_input

partial_train_result

Finalize Training

norm_eq

finalize_train(…)

partial_train_result

train_result

Mathematical Formulation

Training

Given a \((x_{11}, \ldots, x_{1p}, y_1, \ldots, x_{n1}, \ldots, x_{np}, y_n)\) set of training data, \(n \gg p\). The \(X\) matrix of the \(n \times p\) size contains \(x_{ij}\), \(i=1, \ldots, n\), \(j = 1, \ldots, p\) observations of independent variables.

To estimate the coefficients \((\beta_{0j}, \ldots, \beta_{pj})\), you can use the Normal Equation method.

Partial Training

Given a \((x_{11}, \ldots, x_{1p}, y_1, \ldots, x_{n1}, \ldots, x_{np}, y_n)\) block of training data, \(n \gg p\). The \(X\) matrix of \(n \times p\) size contains \(x_{ij}\), \(i=1, \ldots, n\), \(j = 1, \ldots, p\) observations of independent variables.

To compute a cross product of Linear Regression, you can use the Normal Equation method.

Finalize Training

Given a partial result with partial products.

To compute a cross product of Linear Regression, you can use the Normal Equation method.

Inference

The linear regression-based prediction is made for the input vector using the \(y_j = \beta_{0j} + \beta_{1j}x_1 + \ldots + \beta_{pj}x_p\) equation for each \(j=1, \ldots, k\).

Computation Method: norm_eq

The method computes means, variance-covariance, or correlation matrix for the dense data. This is the default and the only supported method.

Programming Interface

Refer to API Reference: Linear Regression.

Online mode

The algorithm supports online mode.

Distributed mode

The algorithm supports distributed execution in SPMD mode (only on GPU).