I am using recursive feature elimination with cross-validation (rfecv) with GridSearchCV with RandomForest classifier as follows using
In with pipeline case,
Feature selection (RFECV) is carried out with base model (RandomForestClassifier(random_state = 42, class_weight="balanced")) before applying the grid_searchCV on final estimator.
In without pipeline case,
For each combination of hyperparameter, the corresponding estimator is used for feature selection (RFECV). Hence, it would be time consuming.