Exploring correlations between features
A correlation coefficient between two variables measures the degree of relationship between them. If the coefficient is equal to 1
, we then say that the variables are perfectly correlated, if it is -1
, then we conclude that the second variable is perfectly inversely correlated with the first one. The coefficient of 0
means that no measurable relationship exists between the two variables.
Note
We need to stress one fundamental truth here: one cannot conclude that simply if two variables are correlated, there exists a causal relationship between them. For more information, refer to the following website: https://web.cn.edu/kwheeler/logic_causation.html.
Getting ready
To execute this recipe, you need pandas
. No other prerequisites are required.
How to do it…
We will be checking only correlations between the number of bedrooms that the apartment has, number of baths, the floor area, and price. Once again, we assume that the data is already in the csv_read...