I'd like to select features, and evaluate model performance using nested cross validation. My question is that I have to split data in order to select features or not.
Additionally, is the following method appropriate? ( In the following method, feature selection was conducted without data split.)
- feature selection using correlation coefficient and Boruta algorithm
- Split the data into train and test at outer loop by 5-fold cross validation ( train-outer and test-outer)
- Split train-outer into train and valid at inner loop by 5-fold cross validation ( train-inner and valid-inner)
- Tune parameters of machine learning model (eg. support vector machine) by grid search using train-inner and valid-inner
- Train machine learning model using train-outer and evaluate model performance using test-outer