I am trying to analyse a data. This data has some continuous attributes and the target is also continuous. I used linear regression as well as Random Forests for analysis.
What I want to know is that how do I find out if my target continuous variable is dependent on the continuous features that I am considering or not.
The MSE value can be helpful in comparing the results of different models. But is my target and features having any relationship or not... how do I study that ?
CodePudding user response:
you can study the correlations between features. Uses the .corr() method of the Pandas DataFrame object. This method returns you a correlation matrix and you can see all the correlations between the numeric variables.
An example of code that you can apply to your data. The second line allows you to see the correlations with your target variable.
corr_matrix = df.corr()
corr_matrix["TARGET"].sort_values(ascending=False)