I am trying to perform PCA reducing 900 dimensions to 10. So far I have:
covariancex = cov(labels);
[V, d] = eigs(covariancex, 40);
pcatrain = (trainingData - repmat(mean(traingData), 699, 1)) * V;
pcatest = (test - repmat(mean(trainingData), 225, 1)) * V;
Where labels
are 1x699
labels for chars (1-26). trainingData
is 699x900
, 900-dimensional data for the images of 699 chars. test
is 225x900
, 225 900-dimensional chars.
Basically I want to reduce this down to 225x10
i.e. 10 dimensions but am kind of stuck at this point.