Performing and Interpreting Linear Regression
Linear regression is a type of regression model that uses linear relationships between predictors and the outcome to predict the outcome. Linear regression models can be thought of as a line running through the feature space that minimizes the distance between the line and the data points. This is best visualized when there is a single predictor (see Figure 5.14), where it is equivalent to drawing a line of best fit on a scatterplot between the two variables but can be generalized to many predictors:
The line is generated by trying to find the line that best minimizes the error (difference) between the line and the data points. We'll learn more about types of errors in the next chapter, where we'll learn to use them to evaluate models, but it's important to note that they are also used in the process of fitting the model.
One of the big benefits of linear...