# PCA dataset to test my implementation

I'm trying to find a dataset with examples of data matrices and their principal components.

I know that I could construct my own dataset using standard implementations found in python, or octave libs, but I want to find a dataset done for other people and maybe already used on other works because I want make sure people will not think that I generated some data that "helps" my implementation.

Searching on the internet, I have found some datasets like this one, but they don't have the principal components calculated.

So, does anyone here know such dataset?

• You may try googling "eigenfaces" - maybe sometimes you'll find the computed principal components. And you'll also be able to test your implementation visually Jul 14 '15 at 16:57

One good and popular dataset is Iris flower data set which you can also find under your link. It has been analyzed with PCA gazillion of times, just google for it or search CrossValidated (see also links given by @ttnphns in the comment below). The first principal axis of this dataset is $$(0.36, -0.085, 0.86, 0.36),$$ as can be found by the following Matlab code:

load fisheriris
X = bsxfun(@minus, meas, mean(meas));
[U,S,V] = svd(X,0);

display(num2str(V(:,1)', 2))


Good luck!

• stats.stackexchange.com/a/102999/3277 and stats.stackexchange.com/a/83114/3277 are some local illustrations of the iris data analyses - just adding to your answer. Jul 14 '15 at 20:20
• But if it has only one pair (matrix, principal components), then, it is not very usefull to me... But, anyway, thank you very much for aswering. Jul 15 '15 at 19:49
• @Vitor, can you please clarify what you mean by "one pair"? I don't think I understand. Also, if you need some specific features in the dataset, please edit your question to clarify these requirements. Jul 15 '15 at 21:11
• @amoeba, of course I can :) It has only one data matrix, right? Then, it has only one set of principal components associated with this matrix. I would like to find several matrices with their principal components in order to run my algorithm over these matrices and compare my resulting PCs with the ones already computed. Jul 16 '15 at 19:09
• @Vitor, Then I don't understand what you mean by "a dataset". Dataset is a data matrix, it's the same thing. Fisher Iris "data matrix" is called "dataset" by everybody! Of course it has one set of principal components. Jul 16 '15 at 21:37