91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 918KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-20
  • 語言: 其他
  • 標簽:

資源簡介

互信息(Mutual Information)是信息論里一種有用的信息度量,它可以看成是一個隨機變量中包含的關于另一個隨機變量的信息量,或者說是一個隨機變量由于已知另一個隨機變量而減少的不肯定性.綜合網上的一些有關互信息的計算,這里一共提供7種不同的程序供大家參考;后期可以繼續交流。

資源截圖

代碼片段和文件信息

function?[?I1?I2?]?=?KraskovMI(?X?Y?k?varargin?)
%KraskovMI?computes?the?Kraskov?estimator?for?the?mutual?information.
%???1.?Input:?X?Y
%?????????????k:?nearest?neighbour
%?????????????zeroFix?(optional):?fix?the?negative?estimation?to?0?(default
%?????????????????????????????????false);
%
%???univariate:?X?Y?(n?x?1)?vector
%???multivariate:?X?Y?(n?x?m)?matrix?(rows=observations
%???columns=variables)
%
%???2.?Output:?I1?I2:?the?two?estimator?of?MI?I(1)?I(2)?(see?Ref.)
%
%?Ref:?Kraskov?Alexander?Harald?St鰃bauer?and?Peter?Grassberger.
%??????“Estimating?mutual?information.“?Physical?review?E?69.6?(2004):?066138.
%
%?Author:?Paolo?Inglese?
%?Last?revision:?17-05-2015

if?nargin??4
????error(‘Wrong?input?number.‘);
end
if?nargin?==?3
????zeroFix?=?false;
end
if?nargin?==?4
????if?~islogical(varargin{1})
????????error(‘zeroFix?must?be?true?or?false‘);
????else
????????zeroFix?=?varargin{1};
????end
end
????

if?size(X?1)?~=?size(Y?1)
????error(‘X?and?Y?must?contain?the?same?number?of?samples‘);
end

nObs?=?size(X?1);

%?compute?distance?between?each?sample?and?its?k-th?nearest?neighbour
dz?=?zeros(nObs?nObs);
dx?=?zeros(nObs?nObs);
dy?=?zeros(nObs?nObs);
for?i?=?1:nObs
????for?j?=?1:nObs
????????dx(ij)?=?sqrt(sum((X(i?:)?-?X(j?:)).^2));
????????dy(ij)?=?sqrt(sum((Y(i?:)?-?Y(j?:)).^2));
????????dz(ij)?=?max([dx(i?j)?dy(i?j)]);
????end
end

%?find?nx(i)?and?ny(i)
Eps?=?zeros(nObs?1);
Nn?=?zeros(nObs?1);

nx1?=?zeros(nObs?1);
ny1?=?zeros(nObs?1);
nx2?=?zeros(nObs?1);
ny2?=?zeros(nObs?1);
for?i?=?1:nObs
????
????dxSample?=?dx(i?:);
????dxSample(i)?=?[];
????
????dySample?=?dy(i?:);
????dySample(i)?=?[];
????
????dzSample?=?dz(i?:);
????dzSample(i)?=?[];
????[EpsSample?NnSample]?=?sort(dzSample?‘ascend‘);
????Eps(i)?=?EpsSample(k);
????Nn(i)?=?NnSample(k);
????
????nx1(i)?=?sum(dxSample?????ny1(i)?=?sum(dySample?????
????nx2(i)?=?sum(dxSample?<=?Eps(i));
????ny2(i)?=?sum(dySample?<=?Eps(i));
????
end

%?mutual?information?estimators
I1?=?psi(k)?-?sum(psi(nx1?+?1)?+?psi(ny1?+?1))?/?nObs?+?psi(nObs);
I2?=?psi(k)?-?1/k?-?sum(psi(nx2)?+?psi(ny2))?/?nObs?+?psi(nObs);

if?(zeroFix)
????if?I1?????????warning(‘First?estimator?is?negative?->?0‘);
????????I1?=?0;
????end
????if?I2?????????warning(‘Second?estimator?is?negative?->?0‘);
????????I2?=?0;
????end
end

end


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????I.A....??????3678??2010-06-09?15:35??互信息4\mutual?information?.m

?????文件???????1493??2017-04-26?10:07??互信息6\MutualInfo.m

?????文件???????2499??2015-10-29?09:39??KraskovMI5\KraskovMI.m

?????文件???????1034??2006-01-06?11:29??互信息\condentropy.m

?????文件???????1237??2006-01-06?11:29??互信息\condmutualinfo.m

?????文件????????724??2006-01-06?11:29??互信息\demo_mi.m

?????文件????????477??2007-08-23?09:49??互信息\elementmexheader.h

?????文件????????761??2006-01-06?11:29??互信息\entropy.m

?????文件???????1800??2006-01-06?11:29??互信息\estcondentropy.cpp

?????文件??????40960??2006-01-06?11:29??互信息\estcondentropy.dll

?????文件???????8901??2006-01-06?11:29??互信息\estcondentropy.mexglx

?????文件??????54608??2007-08-23?09:49??互信息\estcondentropy.mexmac

?????文件???????1249??2006-01-06?11:29??互信息\estentropy.cpp

?????文件??????40960??2006-01-06?11:29??互信息\estentropy.dll

?????文件???????3449??2008-03-03?08:34??互信息\estentropy.dsp

?????文件????????528??2008-03-03?10:22??互信息\estentropy.dsw

?????文件???????8605??2006-01-06?11:29??互信息\estentropy.mexglx

?????文件??????53908??2007-08-23?09:49??互信息\estentropy.mexmac

?????文件??????33792??2008-03-03?10:22??互信息\estentropy.ncb

?????文件??????49664??2008-03-03?10:22??互信息\estentropy.opt

?????文件???????1286??2008-03-03?09:10??互信息\estentropy.plg

?????文件???????1417??2006-01-06?11:29??互信息\estjointentropy.cpp

?????文件??????40960??2006-01-06?11:29??互信息\estjointentropy.dll

?????文件???????8638??2006-01-06?11:29??互信息\estjointentropy.mexglx

?????文件??????54608??2007-08-23?09:49??互信息\estjointentropy.mexmac

?????文件???????3541??2006-01-06?11:29??互信息\estmutualinfo.cpp

?????文件??????40960??2006-01-06?11:29??互信息\estmutualinfo.dll

?????文件???????9623??2006-01-06?11:29??互信息\estmutualinfo.mexglx

?????文件??????54644??2007-08-23?09:49??互信息\estmutualinfo.mexmac

?????文件???????4754??2006-01-06?11:29??互信息\estpa.cpp

............此處省略97個文件信息

評論

共有 條評論

相關資源