I am working with python using pandas, and seaborn libraries. I have a dataframe, that I am using for some machine learning. My dataframe has a target variable, along with several other features. Suppose the following data dictionary
Name | Type | Dtype |
---|---|---|
f1 | ordinal | int |
f2 | ordinal | int |
f3 | nominal | categorical |
f4 | nominal | categorical |
f5 | discrete | int |
f6 | discrete | int |
f7 | continuous | int |
f8 | continuous | int |
target | nominal | int |
Now on this dataset, I wish to see a correlation matrix, in order to check which features are colinear to each other as well as which features strongly associate to the target variable.
Please guide me with the following questions:
- Is using a correlation matrix (with either of the methods such as Spearsman, Kendall, or Pearson) a right approach on this dataset? These correlation methods come from
pandas.DataFrame.corr()
- Does the choice of using either of the above mentioned methods depend on the features OR on the target variable?
- Do we also consider our target variable before making decision about correlation method? Suppose if my target was a continuous one? or even an ordinal one?