Introduction to Linear Regression

A gentle introduction to the algorithm and code for it.

Simple linear and Multiple linear regression plot
y = β0 + β1.X1 # Simple linear regressiony = β0 + β1.X1 + β2.X2 + ... + βn.Xn # Multiple linear regression

The best fit line.

The equation for Residual Sum of Squares

Is our model performing well?

The formula for the R2 score

Let us see this algorithm in action

3295125.11*area + 506109.44*bedrooms + 1874073.79*bathrooms + 1385770.25*stories + 421368.74*mainroad + 253819.75*guestroom + 314233.13*basement + 1021073.02*hotwaterheating + 794828.15*airconditioning + 833078.62*parking + 617166.58*prefarea + -47533.58*furnishingstatus_semi-furnished + -431147.75*furnishingstatus_unfurnished + 2105949.005

Conclusion

Where to go next?

Pursuing Masters in Machine Learning.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store