top of page

Single and Multi-Linear Regression

  • Writer: Arturo Arriaga
    Arturo Arriaga
  • Nov 16, 2021
  • 1 min read


Linear regression is a linear approach for modelling the relationship between a scalar response and one or more explanatory variables (also known as dependent and independent variables).


Multiple linear regression (MLR), also known simply as multiple regression, is a statistical technique that uses several explanatory variables to predict the outcome of a response variable.


The goal here is to predict the value of an unknown feature y given a set of known features x. Suppose you have n data points and k known features.


It follows the following process:

  1. Create an n x (k + 1) matrix, where the first k columns are the k features for the n data points, and the last column is a column of ones.

  2. Calculate B = AT A.

  3. Calculate the projection matrix P = AB1AT .

You can now apply P to your observed ~y values to get predicted values. The idea here is to get the predictions in the subspace formed by the k feature vectors such that the Euclidean distance between the prediction vector and the observed feature vector is minimized.



Comments


Let's connect on LinkedIn

bottom of page