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. ...

Get Python: Data Analytics and Visualization 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.