The purpose of regression is to find the relationship that exists between data (denoted by x) and its corresponding output (denoted by y) and predict it. The output of all regression problems is a real number (). This can be applied to a range of problems, such as predicting the price of a house or what rating a movie will have.
In order for us to make use of regression, we need to use the following:
- Input data, which could be either scalar values or vectors. This is sometimes referred to as features.
- Training examples, which include a good number of (xi, yi) pairs; that is, the output for each input.
- A function that captures the relationship between the input and output—the model.
- A loss or an objective function, which tells us how accurate our model is.
- Optimization, to minimize the loss or the objective function.
Before we go further, let's...