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

Recipes documentation unclear on how to pass data for CV #1258

Closed
jxu opened this issue Nov 8, 2023 · 3 comments
Closed

Recipes documentation unclear on how to pass data for CV #1258

jxu opened this issue Nov 8, 2023 · 3 comments

Comments

@jxu
Copy link

jxu commented Nov 8, 2023

In ?recipes, the data passed to recipes() in the example is the training split. But it is unclear what should be passed if we split data using vfold_cv. Is it the entire dataset? The docs seem to suggest the actual data doesn't matter for the recipe, just the column names.

https://www.tidymodels.org/start/resampling/ does not show how to use a recipe, just formula.

@EmilHvitfeldt
Copy link
Member

We typically don't use a vfold_cv fold object directly with a recipe() object. packages like tune knows how to handle both recipes and vfold_cv objects.

The dataset passed to recipe() does a couple of things. It is used to denote the column names, and their types. This information is used to detect whether some variables are missing, or if they have the wrong types.

When you go to prep() a recipe it will use that data by default, if the training argument of prep() has not been set.

@jxu
Copy link
Author

jxu commented Nov 13, 2023

So only the column names and types of the data passed in matter? It's not clear in the documentation.

Copy link

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

@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants