Correlation shows how variables are correlated with each other. Correlation offers a better understanding than covariance and is a normalized version of covariance. Correlation ranges from -1 to 1. A negative value represents the increase in one variable, causing a decrease in other variables or variables to move in the same direction. A positive value represents the increase in one variable, causing an increase in another variable, or a decrease in one variable causes decreases in another variable. A zero value means that there is no relationship between the variable or that variables are independent of each other. Have a look at the following code snippet:
# Correlation between columns of dataframe
data.corr(method ='pearson')
This results in the following output:
The 'method' parameter can take one of the following three parameters:
- pearson: Standard correlation coefficient
- kendall: Kendall's tau correlation coefficient...