Graduate Apliying PCA to two correlated stochastic processes

Click For Summary
SUMMARY

The discussion centers on applying Principal Component Analysis (PCA) to two correlated stochastic processes represented by 9x51 matrices of wind speed measurements in MATLAB. The user attempts to concatenate the matrices using cat(3,U,V) for joint PCA analysis but encounters issues, as MATLAB's PCA function does not support 3-D arrays. The user seeks a solution to find joint main directions of variation without computing each process separately, highlighting the limitations of MATLAB's PCA toolbox.

PREREQUISITES
  • Understanding of Principal Component Analysis (PCA)
  • Familiarity with MATLAB programming
  • Knowledge of matrix operations in MATLAB
  • Experience with Singular Value Decomposition (SVD)
NEXT STEPS
  • Research MATLAB's PCA documentation for potential workarounds
  • Explore alternative methods for joint PCA analysis in MATLAB
  • Investigate the use of 2-D matrices for PCA in MATLAB
  • Learn about PCA implementations in Mathematica for comparative analysis
USEFUL FOR

Data scientists, statisticians, and researchers working with correlated stochastic processes who are utilizing MATLAB for PCA analysis.

Frank Einstein
Messages
166
Reaction score
1
Hello everyone, I have two matrices of size 9*51, meaning that I have 51 measurements of a stochastic process measured at 9 times, being precise, it is wind speed in the direction X, I have the same data for the direction Y. I am aware that both stochastic processes are not independent, so I would like to use PCA over both of them at the same time. My software of choice is Matlab.

I cam perform the PCA analysis simply as:
[coeffU, scoreU, latentU, tsquaredU, explainedU, muU]=pca(U,'Centered',false), however, if I try to execute it over UV, being UV equal to cat(3,U,V), it doesn't work.

Can anyone tell me if there is a way of finding the joint main directions of variation instead of having to compute each one apart?

Thanks for Reading.
 
Physics news on Phys.org
I am very familiar with MATLAB and with PCA, but not with MATLAB's PCA. (I use the SVD functions.) Which toolbox is PCA in?

I ask because I'm not sure if you have small syntactic problem with the PCA function or a deeper problem (which is being exposed by the difficulties with the PCA function) in the formulation of the question. For instance, often, MATLAB's matrix factorization functions refuse to work with 3-D arrays, so CAT(3,...) would always fail.
 
  • Like
Likes Frank Einstein
JMz said:
I am very familiar with MATLAB and with PCA, but not with MATLAB's PCA. (I use the SVD functions.) Which toolbox is PCA in?

I ask because I'm not sure if you have small syntactic problem with the PCA function or a deeper problem (which is being exposed by the difficulties with the PCA function) in the formulation of the question. For instance, often, MATLAB's matrix factorization functions refuse to work with 3-D arrays, so CAT(3,...) would always fail.

First of all, thanks for your answer.

Second, this has all the info regarding Matlab PCA that I am aware of: https://fr.mathworks.com/help/stats/pca.html

And third, I am posting this because I know that Mathematica can do this (see attached images). I have tried to calculate the same on Matlab since I don't want to switch between programs.

https://ibb.co/fUGAjo
This is the attempt in Matlab

https://ibb.co/eYBPc8
And this is in Mathematica.

You are right in the fact that cat(3,...) doesn't work, so that's my problem. Are you aware of any kind of solution to circumvent it and do as I have done on Mathematica.

Thanks again
 
I do not have a good working knowledge of physics yet. I tried to piece this together but after researching this, I couldn’t figure out the correct laws of physics to combine to develop a formula to answer this question. Ex. 1 - A moving object impacts a static object at a constant velocity. Ex. 2 - A moving object impacts a static object at the same velocity but is accelerating at the moment of impact. Assuming the mass of the objects is the same and the velocity at the moment of impact...

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
523
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K