Info

This question is closed. Reopen it to edit or answer.

Incorporating Procrustes to PCA

2 views (last 30 days)
Curious Mind
Curious Mind on 25 Sep 2017
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi:
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
end
end
  3 Comments
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.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!