PCA before mapstd or vise versa for classification?
12 views (last 30 days)
Show older comments
I have data. I want to use PCA and also normalize it. What I did first was use mapstd then PCA. But I got some weird numbers. Should I mapstd it again? Or should I have waited to mapstd it in the first place?
0 Comments
Answers (1)
the cyclist
on 9 Dec 2017
If you want to normalize your data before doing PCA, you want to mapstd before (and only before) PCA. I'm going to guess at the error you may have made.
To normalize the data for PCA, you probably want to normalize the columns. The mapstd function normalizes the rows. Did you take that into account? You probably want
normed_data = mapstd(data')'
See Also
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!