Newer
Older
masterarbeit / oldMcode / compare.m
@Jan-Peter Hohloch Jan-Peter Hohloch on 3 Aug 2016 507 bytes compare all methods, add tresch paper
maxSize=6;

mseErrorAutoenc=zeros([maxSize,1]);
for i=1:maxSize
    ae=trainAutoencoder(trainingData,i,'ShowProgressWindow',false);
    predicted=predict(ae,trainingData);
    mseErrorAutoenc(i)=mse(trainingData-predicted);
end

fig=figure();
subplot(1,3,1);
plot(mseErrorAutoenc)

%PCA
[COEFF,SCORE,latent] = princomp(trainingData);
subplot(1,3,2);
plot(cumsum(latent)./sum(latent))

%NNMF
D=cell(maxSize,1);
for i=1:maxSize
    [W,H,D{i}]=nnmf(trainingData,i);
end

subplot(1,3,3);
plot(diff(cell2mat(D)))