
Preprocessing Data
sigma3 = std(c3); % Da ta standard deviati on
hist(c3) % Plot histogram
hold on
plot([mu3 mu3],[0 N],'r','LineWidt h',2 ) % Mean
X = repmat(mu3+(1:2)*s igma3,2,1);
Y = repmat([0;N],1,2);
plot(X,Y,'g','LineWidth',2) % Standard deviations
legend('Data','Mean','Stds')
hold off
The plot shows th at some of the dat a are more th an two stand ard deviation s
above the m ean. If you identify these data as errors (not features), replace
them with
NaN values as follows:
outliers = (c3 - mu3) > 2*sigma3;
c3m=c3;%Copyc3toc3m
5-5
Comentários a estes Manuais