求排列熵的matlab源程序?
本人需要求出手上脑电数据的排列熵,哪位大侠能赐教排列熵的matlab源程序?function = pec(y,m,t)
%Calculate the permutation entropy
%Input: y: time series;
% m: order of permuation entropy
% t: delay time of permuation entropy,
% Output:
% pe: permuation entropy
% hist:the histogram for the order distribution
%Ref: G Ouyang, J Li, X Liu, X Li, Dynamic Characteristics of Absence EEG Recordings with Multiscale Permutation % % Entropy Analysis, Epilepsy Research, doi: 10.1016/j.eplepsyres.2012.11.003
% X Li, G Ouyang, D Richards, Predictability analysis of absence seizures with permutation entropy, Epilepsy % % Research,Vol. 77pp. 70-74, 2007
ly = length(y);
permlist = perms(1:m);
c(1:length(permlist))=0;
for j=1:ly-t*(m-1)
=sort(y(j:t:j+t*(m-1)));
for jj=1:length(permlist)
if (abs(permlist(jj,:)-iv))==0
c(jj) = c(jj) + 1 ;
end
end
end
hist = c;
c=c(find(c~=0));
p = c/sum(c);
pe = -sum(p .* log(p));
gghhjj 发表于 2012-12-5 01:10 static/image/common/back.gif
谢谢,我先在数据上运行试试。 Multiscale Permutation Entropy (MPE)
matlabcentral/fileexchange/authors/256154 这个程序计算时有很多冗余,在算m=7以上的排列熵时,慢得要命 jf00332001 发表于 2013-7-23 10:21 static/image/common/back.gif
这个程序计算时有很多冗余,在算m=7以上的排列熵时,慢得要命
不对吧,大于1呢 五楼说的对,计算量有点大
页:
[1]