-
Notifications
You must be signed in to change notification settings - Fork 1
/
getECA.m
27 lines (23 loc) · 1.26 KB
/
getECA.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you find the code useful for your research, please cite the paper %
% below: %
% %
% D. Huang, C.-D. Wang, H. Peng, J. Lai, & C.-K. Kwoh. "Enhanced Ensemble %
% Clustering via Fast Propagation of Cluster-wise Similarities."To appear %
% in IEEE Transactions on Systems, Man, and Cybernetics: Systems. %
% DOI: 10.1109/TSMC.2018.2876202 %
% %
% The code has been tested in Matlab R2016a and Matlab R2016b. %
% %
% www.researchgate.net/publication/328581758 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function ECA = getECA(bcs,Sim)
% Compute the enhanced co-association (ECA) matrix.
% Dong Huang. Apr. 18, 2018.
[N,M] = size(bcs);
ECA = zeros(N,N);
Sim = Sim-diag(diag(Sim))+diag(ones(size(Sim,1),1));
for m = 1:M
ECA = ECA + Sim(bcs(:,m),bcs(:,m));
end
ECA = ECA/M;