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

Add function to extract training + validation set after initial_validation_split() #467

Closed
paulcbauer opened this issue Feb 29, 2024 · 4 comments

Comments

@paulcbauer
Copy link

Hi, I am just coming back from teaching a tidymodels workshop (tidymodels is fun to teach!). I wonder whether it might make sense to add a function, e.g., training_validation() that can be used to extract the full training set at the end. That is assuming one wants to build the final model on the latter. Right now, one would do this manually I think, e.g., below:

data_train <- training(data_split)
data_validation <- validation(data_split)
data_test <- testing(data_split)
data_train_full <- bind_rows(data_train, data_validation)
@hfrick
Copy link
Member

hfrick commented Feb 29, 2024

Thanks for the request and nice to hear that it's fun to teach tidymodels! Have you seen last_fit() from tune for that final model fit? It has an argument add_validation_set which allows you to specify that both the training and validation set are used to train that final model.
https://tune.tidymodels.org/reference/last_fit.html

@paulcbauer
Copy link
Author

paulcbauer commented Feb 29, 2024 via email

@hfrick
Copy link
Member

hfrick commented Feb 29, 2024

Excellent, closing this issue then!

@hfrick hfrick closed this as completed Feb 29, 2024
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 Mar 15, 2024
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