Linear regression
Linear regression is by far the most widely used, or at least the most commonly known, regression method. The terminology is usually associated with the concept of fitting a model to data. Linear regression can be implemented using the least squares method. Practically, the least squares method entails the minimization of the sum of the squares of the error between the observed data and the actual model.
The least squares problems fall into two categories:
- Ordinary least squares
- Nonlinear least squares
One-variate linear regression
Let's start with the simplest form of linear regression, which is the single variable regression, in order to introduce the terms and concepts behind linear regression. In its simplest interpretation, the one-variate linear regression consists of fitting a line to a set of data points {x, y}.
Note
Single variable linear regression is given by the following formula:
Here, w1 is the slope, w0 is the intercept, f is the linear function that minimizes...