First, load the auto-mpg.xlsx file. We will use the data in it to illustrate different aspects of this chapter. The meaning of the variables are described in the Excel file and in its references.
The simplest way of assessing correlations between variables is to create a scatter diagram, taking all features in pairs. If we plot, for example, the Cylinders variable in the x axis against the Displacement variable in the y axis, we will see a positive correlation (that is, the greater the number of cylinders the higher the displacement value). This is to be expected, since the calculation of the engine displacement, here expressed in cubic inches, is linearly dependent on the number of cylinders.
The scatter diagram can be seen in the following diagram:
If we, instead, look at the relationship between fuel consumption and car weight, the diagram will...