MATLAB Answers

Incorporating Procrustes to PCA

2 views (last 30 days)
Curious Mind
Curious Mind on 25 Sep 2017
Commented: Walter Roberson on 26 Sep 2017
So I have a PCA matlab GUI. It can perform Jackknifing for displaying a training and prediction cloud plot of the data. The plot doesn't look good because it doesnt perform the rotation well. I want to add procrustes code to it to make it work but i'm finding it difficult in getting around it. The procrustes code is
[d, Z, transform] = procrustes(tdata,tdata)
Below is the code i want to add procrustes to:
colcode_temp = colcode;
if jackState == 2 %training cloud mode
for i = 1:size(tdata,1)
for j = 1:size(jknife,1)
plotMe(size(Xmean,1)+size(jknife,1)*(i-1)+j,1) = jknife(j,i,1);
plotMe(size(Xmean,1)+size(jknife,1)*(i-1)+j,2) = jknife(j,i,2);
colcode_temp(size(Xmean,1)+size(jknife,1)*(i-1)+j,:)=0.7; %turn all cloud points gray


Walter Roberson
Walter Roberson on 25 Sep 2017
What is the question being asked?
Curious Mind
Curious Mind on 26 Sep 2017
@Walter Roberson I wanna know how to add the Procrustes code. Anytime I add it it doesn't seem to effect the results I want. The Procrustes code is supposed to conform tdata to itself and give Z which is a transformed form of tdata and then plot tdata agains the Z. I want a situation where when I click tcloud button in my gui it will excecute the Procrustes part as well
Walter Roberson
Walter Roberson on 26 Sep 2017
If you
[d, Z] = procrustes(tdata,tdata)
you would get back a linear transform -- that is, Z is always going to equal tdata in that case.
You should be using procrustes with two different sets of data.

Sign in to comment.

Answers (0)

Sign in to answer this question.


Translated by