Transform points from PCA space to the original space!

1 view (last 30 days)
Dears, I am using PCA to better represent my data so I could fit a gaussian distribution on them more easily. This is my code
MyMatrix=rand(2,hight*width); [COEFF,SCORE] = princomp(MyMatrix'); MyMatrix =SCORE';
hold on
options = statset('Display','final');
GMModel = fitgmdist(MyMatrix',2,'Options',options);
Means=GMModel.mu;
g=ezcontour(@(x,y)pdf(GMModel,[x y]),[min(MyMatrix(1,:)) ...
max(MyMatrix(1,:))],[min(MyMatrix(2,:)) max(MyMatrix(2,:))] );
plot(Means(1,1),Means(1,2),'+');
plot(Means(2,1),Means(2,2),'+');
hold off
Now I want to find the Means that I just calculated in the 2D original space, My question is : how to transform Means from the PCA coordinate space back to the original space.
I will appreciate any help! Thank you.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!