njit-etd2003-081 - New Jersey Institute of Technology
njit-etd2003-081 - New Jersey Institute of Technology njit-etd2003-081 - New Jersey Institute of Technology
299 case {'hier_single'} cluster= dcAgg(distance, 'single', k); for j = 1:k Estlndex(i,cluster{j })=j ; end case {'hier_centroid'} cluster = dcAgg(distance, 'centroid', k); for j = 1:k EstIndex(i,cluster{j }) j; end case 'fuzzy' m=1.5; Estlndex(i,:) = dcFuzzy(Data,k,m,InitCentres); case 'random' Estlndex(i,:) = floor(rand( 1 ,R)*k+ 1 ); %randomly assign labels %otherwise error(sprintf('DOCLUSTERING - unsupported algorithm "%s'",Algorithm)) end %of switch/case %return adjusted Rand index (accuracy) if true labels are given if length(TrueID)>0 RITrue(i)=RandIndex(EstIndex(i,:), TruelD); else RITrue(i)=-1; end end %of repetitions loop %Calculate adjusted Rand index between each pair of solutions found if Repetitions > 1 l=0; for i=1 :Repetitions-1 for j=i+ 1 :Repetitions l=l+1; RISelf(l)=RandIndex(EstIndex(i,:)',EstIndex(j,:)'); end end else RISelf=0; end
300 B.2.8 Cross-correlation Program The program below calculates the correlation indices for selecting the best timefrequency representation. function xy = corrcoef(x,y) %CORRCOEF Correlation coefficients. % CORRCOEF(X) is a matrix of correlation coefficients formed % from array X whose each row is an observation, and each % column is a variable. % CORRCOEF(X,Y), where X and Y are column vectors is the same as % CORRCOEF([X YD. % If C is the covariance matrix, C = COV(X), then CORRCOEF(X) is % the matrix whose (i,j)'th element is C(i,j)/SQRT(C(i,i)*C(j,j)). % See also COV, STD. % J. Little 5-5-86 % Revised 6-9-88 LS 2-13-95 BJ % Copyright 1984-2001 The MathWorks, Inc. % $Revision: 5.8 $ $Date: 2001/04/15 12:01:28 $ switch nargin case 1 c = cov(x); case 2 c = cov(x,y); otherwise error('Not enough input arguments.'); end d = diag(c); xy = c./sqrt(d*d');
- Page 277 and 278: 248 4) Click on file, close to exit
- Page 279 and 280: 250 • TN 11
- Page 281 and 282: 252 B.1.2 Partial Coherence Between
- Page 283 and 284: 254
- Page 285 and 286: 256 Block Diagram !rime of record K
- Page 287 and 288: 258
- Page 289 and 290: 260 B.2.2 Time — Frequency Analys
- Page 291 and 292: 262 This program provides the STFT
- Page 293 and 294: 264 G(:j+1)=G(:,j+1)/(2*sum(G(:j+1)
- Page 295 and 296: 266 T=(length(Signa)/sample)/(Times
- Page 297 and 298: 268 subplot(3, 1,3), plot(T,E); xla
- Page 299 and 300: 270 4. The program creates five out
- Page 301 and 302: 272 B.2.3.4 Program to Generate Sym
- Page 303 and 304: 274 ylabel('frequency'); title('Ins
- Page 305 and 306: 276 The program will run and output
- Page 307 and 308: 278 axis([0 1 0 2]); grid on; xlabe
- Page 309 and 310: 280 vagal=sum(TFDs(HFC,1:k)); symto
- Page 311 and 312: 282 plot(J,symtopar); %plot(A,symto
- Page 313 and 314: 284 4. Remove the constant levels a
- Page 315 and 316: 286 Make sure the agreement is quit
- Page 317 and 318: 288 B.2.6 Principal Components Anal
- Page 319 and 320: 290 Columns 12 through 15 'LF_pcoh_
- Page 321 and 322: 292 I= 1.0000 -0.0000 -0.0000 -0.00
- Page 323 and 324: 294 variances = 3.4083 1.2140 1.141
- Page 325 and 326: 296 B.2.7 Cluster Analysis Program
- Page 327: 298 end [R,C]=size(Data); if length
- Page 331 and 332: 302 C.3 Partial coherence of HR and
- Page 333 and 334: 304 [13] Madwed, J., and R. Cohen.
- Page 335 and 336: 306 [41] Mallat, S. G., "A Theory f
- Page 337: [70] Tazebay, M.V., R.T. Saliba and
299<br />
case {'hier_single'}<br />
cluster= dcAgg(distance, 'single', k);<br />
for j = 1:k<br />
Estlndex(i,cluster{j })=j ;<br />
end<br />
case {'hier_centroid'}<br />
cluster = dcAgg(distance, 'centroid', k);<br />
for j = 1:k<br />
EstIndex(i,cluster{j }) j;<br />
end<br />
case 'fuzzy'<br />
m=1.5;<br />
Estlndex(i,:) = dcFuzzy(Data,k,m,InitCentres);<br />
case 'random'<br />
Estlndex(i,:) = floor(rand( 1 ,R)*k+ 1 ); %randomly assign labels<br />
%otherwise<br />
error(sprintf('DOCLUSTERING - unsupported algorithm "%s'",Algorithm))<br />
end %<strong>of</strong> switch/case<br />
%return adjusted Rand index (accuracy) if true labels are given<br />
if length(TrueID)>0<br />
RITrue(i)=RandIndex(EstIndex(i,:), TruelD);<br />
else<br />
RITrue(i)=-1;<br />
end<br />
end %<strong>of</strong> repetitions loop<br />
%Calculate adjusted Rand index between each pair <strong>of</strong> solutions found<br />
if Repetitions > 1<br />
l=0;<br />
for i=1 :Repetitions-1<br />
for j=i+ 1 :Repetitions<br />
l=l+1;<br />
RISelf(l)=RandIndex(EstIndex(i,:)',EstIndex(j,:)');<br />
end<br />
end<br />
else<br />
RISelf=0;<br />
end