Chapter 3. Linear Regression

We've learned from previous chapters that regression problems involve predicting a numerical output. The simplest but most common type of regression is linear regression. In this chapter, we'll explore why linear regression is so commonly used, its limitations, and extensions, and then touch on polynomial regression, which you may consider when a linear relationship isn't a best fit for your circumstances.

Introduction to linear regression

In linear regression, the output variable is predicted by a linearly weighted combination of input features. Here is an example of a simple linear model:

Introduction to linear regression

The preceding model essentially ...

Get Mastering Predictive Analytics with R - Second Edition 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.