LINEAR REGRESSION
This chapter describes the code for building a supervised learning model to predict a numerical target variable using linear regression.
Linear regression, as you may know, plots a straight line or plane called the hyperplane that predicts the target value of data inputs by determining the dependence between the dependent variable (y) and its changing independent variables (X). In a p-dimensional space, a hyperplane is a subspace equivalent to dimension p−1. Thus, in a two-dimensional space, a hyperplane is a one-dimensional subspace/flat line. In a three-dimensional space, a hyperplane is effectively a two-dimensional subspace. Although it becomes difficult to visualize a hyperplane in four or more dimensions, the notion of a p−1 hyperplane also applies.
Figure 24: The distance of the data points to the hyperplane
The goal of the hyperplane is to dissect the known data points with minimal distance between itself and each data...