Linear Regression
Discussion of linear regression
This post will be another short Machine Learning lesson (or a set of materials to be more precise). Particularly, it will be about Linear Regression, which is a method of supervised machine learning (when there is a training set).
First of all, please watch these videos explaining the theoretical material: video 1 and video 2
Basically, it is a way to "predict" (or diagnose) a result from an input, after training the model with the training set.
The mathematics behind this is explained here and it is also known as the best fitting curve.
In order to consolidate this material (at least for myself :)), here is an easy exercise. Given the training set:
x: | 0 | 1 | 2 | 3 | 4 |
y: | 3 | 6 | 7 | 8 | 11 |
Find the hypothesis function:
Using the formulas from the video material:
and the fact that M=5, we have:
So