Should feature scaling/standardization/normalization be done before or after feature selection, and before or after data splitting?
I am confused about the order in which the various pre-processing steps should be done
Some feature selection methods will depend on the scale of the data, in which case it seems best to scale beforehand. Other methods won't depend on the scale, in which case it doesn't matter.
All preprocessing should be done after the test split. There are some cases where it won't make a difference, but if you're uncertain it's safer to do everything after splitting. The test set is supposed to act as data your model will see in production; you won't have access to that data to help define scale (or anything else), so don't use it that way while training.
fit_transform
on training folds and just transform
on testing folds, and that's handled by all of the cross-validation methods.)
$\endgroup$
cross_val_score
or GridSearchCV
will call the pipelin). See stackoverflow.com/a/68285130/10495893 for how the pipeline calls individual steps.
$\endgroup$