view recoverData.m @ 3:069653867b3b

Implement PCA
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 06 Dec 2011 03:22:07 -0500
parents ded78d0b4987
children
line wrap: on
line source

function X_rec = recoverData(Z, U, K)
  ##RECOVERDATA Recovers an approximation of the original data when using the 
  ##projected data
  ##   X_rec = RECOVERDATA(Z, U, K) recovers an approximation the 
  ##   original data that has been reduced to K dimensions. It returns the
  ##   approximate reconstruction in X_rec.
  ##
  
  X_rec = Z*U(:, 1:K)';

end