3.8 Proper implementation
We stated at the beginning of this chapter that we should think of feature engineering as creating a blueprint rather than manually performing each task individually. This helps us in two ways: (1) thinking sequentially and (2) to apply appropriately within the resampling process.
While your project’s needs may vary, here is a suggested order of potential steps that should work for most problems:
Filter out zero or near-zero variance features.
Perform imputation if required.
Normalize to resolve numeric feature skewness.
Standardize (center and scale) numeric features.
Perform dimension reduction (e.g., PCA) on numeric features.
One-hot or dummy encode categorical features.
Also, refer to tidymodels recipes - ordering of steps (https://recipes.tidymodels.org/articles/Ordering.html)