Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenges using all_nominal() and all_numeric() #620

Closed
juliasilge opened this issue Dec 14, 2020 · 2 comments · Fixed by #634
Closed

Challenges using all_nominal() and all_numeric() #620

juliasilge opened this issue Dec 14, 2020 · 2 comments · Fixed by #634
Labels
feature a feature request or enhancement

Comments

@juliasilge
Copy link
Member

We have lots of examples of folks having trouble with all_nominal() and all_numeric() when they accidentally select outcomes or other non-predictors. Mine talked about running into this during teaching, and here is one example of many from the general user base. A significant challenge is that because of how/when these steps are evaluated, the error message is often opaque.

What would be a good way to reduce this friction?

  • Should all_nominal() and all_numeric() only select predictors?
  • Should these be replaced by new selectors like all_nominal_preds() and all_numeric_preds()?
  • Some recipe steps are more prone to this problem, like step_dummy(). Protections at the step level?
  • Something else?
@juliasilge juliasilge added the feature a feature request or enhancement label Dec 14, 2020
@mine-cetinkaya-rundel
Copy link

I like the idea of protections at the step level, but if this is not feasible/desirable (or even if it is), I think adding selectors like all_nominal_preds() and all_numeric_preds() and promoting these in the function docs can help. I think it's also useful to demonstrate using multiple selectors in the function docs (e.g. step_dummy(all_nominal(), all_predictors(), -all_outcomes())) though the need for that is lower if the combined selectors are in place.

@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org

@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants