Calculate entropy of a thresholded correlation matrix
3 views (last 30 days)
Show older comments
Greetings All!
I am reasonably new to coding and would very much like your opinion and advice.
I have several time series for nodes of different networks. I want to create correlation matrices from selections of these time series and compare the entropy of different correlation matrices. I have the option of thresholding these matrices to get a top percentage (it is noisy data) and possibly even binarising these according to the threshold.
Can I simply use matlab's "entropy" function for a grey scaled image validly? https://uk.mathworks.com/help/images/ref/entropy.html.
Or could I use wentropy(x , 'shannon') https://uk.mathworks.com/help/wavelet/ref/wentropy.html which i belive is meant for wave signals
I understand that the entropy will vary according to the size of the matrix (my matrices vary from 61x61 to 213x213). Thus should I just code the normalised shannon entropy?
%%%%%%%%%
X_uni = unique(X);
X_uni_size = numel(X_uni);
n = numel(X)
P = zeros(X_uni_size,1);
for i = 1:X_uni_size
P(i) = sum(X == X_uni(i));
end
P = P ./ numel(X);
% Compute the Normalised Shannon's Entropy
H = -sum(P .* log2(P))/log2(P).*n
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
As an alternative I was thinking of just colapsing these matrices into a vector and using something like sample entropy.
Ideally I would want to use several types of complexity measure on these matrices so any suggestion is very welcome !
Best
Peter
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!