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?