S=load(‘caldata.txt’); % the name of the

calibration data file

id=S(:,1) ;

t=S(:,2) ; % class labels (target)

X=S(:,3:7) ; % attributes

fid=fopen(‘caldata_id.txt’,‘r’); % the file

containing the contaminant names

names=[] ;

for i=1:length(t)

if i==1

names=str2mat(fscanf(fid,‘%s’,1)) ;

else

names=str2mat(names, fscanf(fid,‘%s’,1)) ;

end

end

fclose(fid) ;

X1=[] ; X0=[] ;

for i=1:length(t)

if t(i)==1

X1=[X1;X(i,:)] ;

end

if t(i)==0

X0=[X0;X(i,:)] ;

end

end

aaa=size (X1) ; NT1=aaa(1) ; % The number of

contaminants with T=1

aaa=size(X0); NT0=aaa(1); % The number of

contaminants with T=0

% ----------------------------------------------------------------------

% Plot correlation analysis of attributes

figure(1)

str(1)={‘Severity’} ;

str(2)={‘Potency’} ;

str(3)={‘Prevalence’} ;

str(4)={‘Magnitude’} ;

str(5)={‘Persist/Mob’} ;

fs=12;

for i=1:5



The National Academies | 500 Fifth St. N.W. | Washington, D.C. 20001
Copyright © National Academy of Sciences. All rights reserved.
Terms of Use and Privacy Statement