Train & test data partition

dataexploration
pca
dimensionreduction
variableselection

#1

Is it always advisable to do the data treatment/variable selection/dimension reduction of the whole sample dataset before it actually get partitioned into train and test(70:30/60:40)?


#2

It is recommended to do all the pre-processing before making partition as otherwise you have to do the same activity again on other partition if you did this earlier.