I have some data at hand, I want to correlate them, but I do not know what is the equation I should need, how can I do it ?

1 view (last 30 days)
huazai2020 on 5 Jul 2020
Commented: huazai2020 on 20 Jul 2020
I have a lot data at hand, I want to correlate them, but I do not know what is the equation I should need, how can I do it ? Does anyone know how to deal with it ?
dpb on 6 Jul 2020
No, because I can't see your data, either...nor do I have even whatever knowledge about what the data might happen to be that you have by being your data -- that should tell you something about what relationships might be.

Sign in to comment.

Answers (1)

Puru Kathuria
Puru Kathuria on 16 Jul 2020
Edited: Puru Kathuria on 16 Jul 2020
Assuming your data has more than one features/variables, say M features and N data points.
Now, correlation can be observed between any pair of features and it can tell you how strongly are those variables related.
Correlation among those variables can be positive(when both variables grow in the same direction), negative(when variables grow in the opposite direction) or no correlation at all.
Now that we know something about correlation, there are multiple ways to observe it in the data.
First, you can plot your pair of variables and analyse the plots visually, this can be done using pair plotting [Link1, Link2, Link3]. Using this technique you will see C(M,2) number of plots, thus we prefer this plot when we have a limited number of variables to analyse.
Second, you can find a linear correlation coefficient, Pearson’s coefficient[Link4] is the most commonly used. This acts as a metric to calculate the correlation among variables. This correlation coefficient ranges from −1 to 1, where 1 implies perfect positive correlation, -1 implies a perfect negative correlation and 0 implies no correlation. [Link5]
Note: For MATLAB specific implementation check out the above mentioned links in the name of Link1, Link2, Link3, Link4 and Link5.

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!