3

I found that the Stepwise Algorithm for variable selection implemented natively in R with step() is not integrated in Tidymodels.

I do not know if there is a reason for not using it (because of better procedures), or is it simply a lacking feature.

Marco Repetto
  • 336
  • 2
  • 15
  • 2
    Yep, we are unlikely to build support for [stepwise variable selection](https://stats.stackexchange.com/questions/20836/algorithms-for-automatic-model-selection/20856#20856) in tidymodels itself. If you are looking for variable selection, you might consider lasso regularization instead. – Julia Silge Mar 16 '21 at 22:35

1 Answers1

3

(Didn't see Julia's message... what she said)

It's not a huge priority since other methods (e.g. regularization) are uniformly superior methods to feature selection.

You could create a custom engine to do so or submit an issue for it

topepo
  • 13,534
  • 3
  • 39
  • 52
  • Can I use regularization to select features, and then use the variables selected there to fit a model using classical methods? I realize the parameters estimates will be different, but we really need to do inference. And my understanding is that regularization does not produce inference... – Aegis Feb 28 '23 at 14:56
  • I think my question is implicitly answered (no pun intended) by https://bookdown.org/max/FES/classes-of-feature-selection-methodologies.html – Aegis Feb 28 '23 at 18:24