O'Reilly logo

Mastering Python Data Visualization by Kirthi Raman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linear regression

The main goal of using linear regression is to predict a numeric target value. One way to do this is to write an equation for the target value with respect to the inputs. For example, assume that we are trying to forecast the acceptance rate of a fully rounded student who participates in sports and music, but belongs to a low-income family.

One possible equation is acceptance = 0.0015*income + 0.49*(participation_score); this is a regression equation. This uses a simple linear regression to predict a quantitative response with a single feature. It takes the following form:

Linear regression

Together, β0 and β1 are called the model coefficients. To ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required