I need to split my data to training set, dev set and test set.
Then I need to use StandardScaler() and PCA to preprocess my data.
Here comes the question:
- Should I use PCA before StandardScaler() and before splittig my data to training set, dev set and test set?
- Should I use StandardScaler() to fit my training set, then transform my dev set and test set? or to fit my training set and dev set, then transform my test set.
Thanks a lot for your reply.