Linear regression

Finally, let's review yet another model—arguably, the most established and popular around the world. Linear regression is actually a statistical model with a long history. The idea behind linear regression is as follows.

Assuming that variables have linear relationships, independent variables are not correlated, and there is a certain variance in the features, we can estimate the linear relationship between independent and target variables. As a result, our model will be present as a set of coefficients, one per each feature (independent variable), plus one for bias:

Here, i stands for the record index and p for the index ...

Get Learn Python by Building Data Science Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.