Skip to content

Instantly share code, notes, and snippets.

Linear Regression

Sometimes we want to map $x$ to $y$ and we need the 'how'. One way is a linear-fit. Our job will then be to find those constants. Common examples include:

  • simple linear regression: $y = c_1 x + c_0$
  • multivariable or multiple linear regression $y = \sum_i c_i x_i$
  • multivariate or general linear regression $y_j = \sum_i c_{ji} x_i = \mathbf{C}_j \cdot x$
  • polynomial linear regression: $y = \sum x_i^ic_i$

linear here means that the coefficients independent and of power 1.

@santifoo
santifoo / regression.md
Last active June 30, 2023 14:03
Linear Regression

Simple Linear Regression

Say that we have data regarding two variables:

y x
2 1
5 2
10 3