How to do PCA in Matlab?
Show older comments
I have a dataset matrix that have 41 columns, and more than 20000 Rows
I filled the missing data and did a normalization
Now, I want to do Princple Component Analysis (PCA)
How to do that using code?
Name of my table = Table_NormalizedData
Here is a screenshot of my matrix table:

Answers (1)
Bora Eryilmaz
on 16 Dec 2022
Edited: Bora Eryilmaz
on 16 Dec 2022
You can use the pca command from the Statistics and Machine Learning Toolbox: https://www.mathworks.com/help/stats/pca.html.
T = array2table(rand(20000,41))
coeff = pca(T{:,:})
Categories
Find more on Dimensionality Reduction and Feature Extraction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!