In this exercise, we will use Python to perform PCA on a given data matrix.
- Determine the standardized data matrix Z.
- Deduce the correlation matrix RX.
- Determine the spectrum of RX.
- Deduce the principle components matrix CX.
- Decide how many principle components we should retain. Justify your decision.
- Say whether we were able to predict the result of PCA earlier.
The exercise was implemented using the numpy and scikit-learn libraries in Python.
In this exercise, we have learned how to perform PCA in Python and how to determine the optimal number of principal components to retain.