3
$\begingroup$

I am trying to build a classification model so I have tried to check the correlation between the features.

enter image description here

Here Loan_Status is my target variable.

I just don't know how to extract information from this? Please help. I have questions like. Is -0.0047 corelation of ApplicantIncome with Loan Status useful?

$\endgroup$
  • $\begingroup$ Do you know what correlation is and how it's defined? Have you at read the Wikipedia article on correlation? What is the objective of your analysis? $\endgroup$ – shadowtalker Oct 7 '18 at 21:01
  • $\begingroup$ Yes I have read as far as I know there's both positive and negative correlation and if the relation is at 0 means no correlation. I want to know if other features will be useful for building my classification model for prediction my target variable. Loan_Status $\endgroup$ – user_6396 Oct 7 '18 at 21:04
  • $\begingroup$ There is more to correlation than that. $\endgroup$ – shadowtalker Oct 7 '18 at 21:06
  • $\begingroup$ I think you should refer to an introductory statistics textbook. $\endgroup$ – shadowtalker Oct 7 '18 at 21:13
1
$\begingroup$

To help you, that shows the correlations between features and each other feature. For example, the number one in the image that you gave, is shown all along the diagonal part of the matrix. The ones represent the 100% linear correlation with one of the features and one of the other features. This image might help: enter image description here

As you can see negative correlations mean that as one feature value increases, the other feature value decreases. A correlation of 0 means that the features appear to have no linear correlation.

If you want to merely concentrate on the correlations between the label and the features, then here is some python code (the language I assume you are using) to help you:

# Your data should be a pandas core dataframe

yourdata = ...

# To find correlations, use the corr() function
corr_matrix = yourdata.corr()
corr_matrix["your label"].sort_values(ascending=False)
# This should print out a correlation list.
# If it doesn't then wrap the last line of code in print( ) 
# You are going to notice that some features will be missing from the list.
# That is because the corr() function does not return any discrete features.
# If you still have every feature, then every one of your features are continuous.
$\endgroup$
  • 1
    $\begingroup$ Nice, but I believe this is not relevant here. He/she is looking for correlation between features and target. Second of all there is a classification problem at hand, and Pearson correlation measures the correlation between continuous variables, and low correlation does not mean that feature is necessarily useless. These were discussed: @Sam: datascience.stackexchange.com/questions/10674/…, stats.stackexchange.com/questions/328128/… $\endgroup$ – TwinPenguins Oct 8 '18 at 6:19
  • 1
    $\begingroup$ Yes, then there is another way (that I will soon edit) $\endgroup$ – Ethan Yun Oct 8 '18 at 14:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.