Transfering any point in PC space to original space
Mostrar comentarios más antiguos
Dear experts,
I have a difficult question for you. Basically I have a dataset with 6 variables and 27 cases. I did PCA and plottet it. Afterwards I created a circle around it that includes 95% of the points (the circle is regardless in this case.). I have created 8 new points next (A-D and W-Z) as you can See in the following image. Now I want to do PCA reproduction for these 8 points as I want to know what values the variables have for these points.

I would be very glad if you could tell me how I can handle this problem. Thanks in advance.
To make it clear once more. I had 6 variables at first and then seperated 2 PCs, now I have 8 new points and I need to know what values the 6 variables have for them. I hope it´s possible and if it is, I would be very glad if you could tell me how I can handle this problem. Thanks in advance.
edit: I have already found a formular that has to do something with it but to be honest I can´t quite tell what i should do with this formular in my case.
Formular i found:
PCA reconstruction = PC scores * Eigenvectors + Mean
Kind Regards TG
5 comentarios
the cyclist
el 16 de Sept. de 2021
I am a little confused about the 8 new points, so let's clarify the terminology.
In your original data, you had 27 observations measured across 6 variables. Then, you did PCA, and have plotted component 1 and component 2. Importantly, that plot is in principal component space (not the original variable space).
Then, it looks like you are constructing your 8 new points in a way that they are defined in the PC space, at regular intervals. For example, Point W has coordinates [PC1,PC2] = [17, 0], approximately.
Now, I am not 100% on what you mean by "I want to do PCA reproduction". Are you asking what values of the original variables would have given those 8 new points, if you apply the same PCA transformation to them?
If that is not what you mean, maybe you could clarify.
Also, FYI, adding a user's name as a tag does not notify them. (Tags are for topics, not users.) Instead, mention them with the @ sign, like this: @Tom.
Tom
el 16 de Sept. de 2021
Image Analyst
el 16 de Sept. de 2021
We don't need your trusted data. Can you make up some generic, non-proprietary data and attach that? And we're still not sure what you want. OK, so you have 4 variables and 27 observations. So what do you want to know? Do you just want 6 PC variables? If so, why -- what are you going to do with them? Or do you want to model the data and use the 6 variables to predict some kind of output value?
Tom
el 17 de Sept. de 2021
Respuesta aceptada
Más respuestas (1)
BOMMALA SILPA
el 14 de Dic. de 2021
Hello everyone,
I have a question in PCA.I'm working on EEG, I have taken EEG data applied EEMD, got IMFs then applied PCA on IMFs.
[coeff,score,latent,~,explained] = pca(modos);
dataInPrincipalComponentSpace = modos*coeff;
X_again = dataInPrincipalComponentSpace*inv(coeff)';
for me 2 or 3 PCs are enough to retrive the original data. I have tried with above 2 lines but I'm unable to get it.please suggest me how to do it.
8 comentarios
the cyclist
el 14 de Dic. de 2021
Editada: the cyclist
el 14 de Dic. de 2021
If you only need 2 or 3 principal components, then the most common thing to do would be to simply use the first 2 or 3 columns of dataInPrincipalComponentSpace as the new dataset. You don't need to transform back to the original space (which is what the original poster here needed to do).
I suggest that you take a look at the PCA tutorial that I wrote, which has a more complete explanation of how to use PCA. Then, if you still don't, then I suggest you either
- make a comment on that thread (not an "answer", as you did here), OR
- make a whole new question
BOMMALA SILPA
el 15 de Dic. de 2021
Sir still I have a doubt on that. Please share your mail ID so that I will attach everything
Walter Roberson
el 15 de Dic. de 2021
You can create a new Question and attach everything there.
BOMMALA SILPA
el 15 de Dic. de 2021
Editada: Walter Roberson
el 15 de Dic. de 2021
After EEMD on my EEG signal,got IMFs with size 8X251.
The number of principal components retained for the reconstruction of the clean EOG is based on the threshold value driven from the scree plot. I'm unable to do this exactly.
I have followed the following procedure
[coeff, score, latent, tsquared, explained,mu]=pca(IMF,'NumComponents',3);
% IMFs reconstruction
Re_IMF=score * coeff' + mu;
from these IMFs I have to use only few to get clean EOG. Please suggest me how to do it
and how to plot scree plot between eigen values and principal components
the cyclist
el 16 de Dic. de 2021
BOMMALA SILPA
el 16 de Dic. de 2021
Thank you sir. I have got the scree plot
BOMMALA SILPA
el 16 de Dic. de 2021
I think you were not clear with my question
I have an EEG signal,i want to extract the EOG activity in that.
EEMD was performed on the contaminated EEG signal to get the IMFs. We have determined the principal components and arranged them in decreasing order of their respective variation after performing PCA on the IMFs.
only 2 or 3 PCs were sufficient to extract EOG features from the data. This is the thing I have to do.
I have written the code like
load('sc4002e0_recm.mat');
% EEMD
Nstd=0.3*std(X);
NR=100;
MaxIter=10;
[modos its]=eemd(X,Nstd,NR,MaxIter);
for i=1:K
IMF(:,i)=modos(i,:)';
end
%% PCA
[coeff, score, latent, tsquared, explained]=pca(IMF);
then what is the process to extract the EOG from EEG using 2 or 3 PCs. I have tried with this formula also
Re_IMF=score * coeff' + mu;
but I'm not getting the results
the cyclist
el 17 de Dic. de 2021
Sorry, I don't know the answer to your question.
Categorías
Más información sobre Dimensionality Reduction and Feature Extraction en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!