Pairwaise Mutual Information Calculation
이전 댓글 표시
I am trying to estimate the Mutual Information for pairwise combinations for the whole matrix (which is an EEG data). I use the functions defined here link. And I use following code to estimate this pairwise.
Data=csvread('data.csv'); % loads the EEG data.
% MI for pair of recordings in EEG
n=size(Data,1);% Number of Chanenls in EEG data
MICs=zeros(n,n);
for i=1:n
for j=1:n
one=Data(i,:);
two=Data(j,:);
miin=h(one')+h(two')-h([one',two']);
MIC(i,j)=miin;
end
end
- I see different ways to estimate the MI's, however I had written my code above to verify.
- When I tried to estimate the Mean(average) value of MI for all the pairs, Should I remove the diagonals values (which corresponds to the MI for its own pair) and the duplicates values (as the matrix is an outcome of the pairwise estimation).?
- Or Should I just estimate the mean for the whole matrix which is an outcome of the above code?
댓글 수: 4
Image Analyst
2018년 12월 24일
Make it easy for people to help you, not hard, by attaching whatever filename "data" is with the paperclip icon.
By the way, it's not a good idea to have "data" be both the filename string used in load, and the numerical data variable. For example since "data" is the filename,
n=size(data,1);
will give the length of your filename string (number of characters in it), not the number of rows in some numerical array.
Marimuthu Ananthavelu
2018년 12월 24일
madhan ravi
2018년 12월 24일
you didn't attach your data
Marimuthu Ananthavelu
2018년 12월 24일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!