Which data preprocessing steps do I need to perform on which data subset? I want to make predictions using several supervised Machine Learning algorithms and apply 10-fold-cross validation. For doing so, I randomly divided my dataset into in-sample and out-of-sample sets. Moreover, I randomly subdivided the in-sample dataset into training and test set for being able to perform cross-validation. I want to perform a regression task and the predictors include both, numerical and categorical predictors.
As I am quite new to the field of Machine Learning, I am not sure on which subsets I need to perform the following data preprocessing steps.

*

*K-nearest-neighbor imputation of missing numerical data

*Outlier elimination

*Log transforming variables with a right skew (on which subset do I need to determine the skew?)

*Feature selection using filter methods (This includes determining the Pearson correlation or Chi-square of predictors with other predictors and with the target variable as well as determining the variance of predictors)

*Further dataset descriptions such as histograms, mean, median, variance, ...

I am aware that I am trying to prevent a look-ahead bias. However, I am not sure whether I need to perform these steps only on the training subset? Or on the entire in-sample set? Or some of them even on the entire dataset?

You have to make sure that your preprocessing of the training set doesn't use information from the validation or test set ("leakage"). E.g., in your k-nearest neighbor imputation, you must not include data from the validation or test set in this k-NN method.
Similarly for the outlier elimination, transformation, feature selection, ...
All of that could potentially leak information from the validation or test set into the model.
Note that leakage can sometimes be very subtle. So, to be on the save side, repeat all those preprocessing anew with each training set.
