Which feature-selection workflow causes leakage?

A dataset contains 50,000 features and 500 observations. Which evaluation procedure creates the most direct selection leakage?

A

Selecting the 100 features most associated with the target using all observations before cross-validation

B

Performing feature selection independently inside every training fold of nested cross-validation

C

Tuning the number of selected features in the inner loop and evaluating in untouched outer folds

D

Fitting the final selector and model on the complete training dataset after evaluation is finished