What is the correct sequence to perform PCA + cross-validation out of these two?
- Perform PCA and then perform k-fold cross validation on the reduced features.
- Perform k-fold cross validation in outer loop and perform PCA internally.
What is the correct sequence to perform PCA + cross-validation out of these two?