Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Incorporating Procrustes to PCA

2 vues (au cours des 30 derniers jours)
Curious Mind
Curious Mind le 25 Sep 2017
Clôturé : MATLAB Answer Bot le 20 Août 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 commentaires
Curious Mind
Curious Mind le 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 le 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.

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by