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

Deprecate validation_split() #350

Closed
DavisVaughan opened this issue Jul 22, 2022 · 4 comments · Fixed by #449
Closed

Deprecate validation_split() #350

DavisVaughan opened this issue Jul 22, 2022 · 4 comments · Fixed by #449
Labels
feature a feature request or enhancement

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Jul 22, 2022

This is a fairly confusing name because it doesn't produce a split object like initial_split() does. It produces a single resample object. Maybe it should be named validation_set(), or simply validation().

I think we could provide an alias for it with a better name and immediately deprecate the old name with lifecycle::deprecate_warn() (still works, but users get a warning once every session).

@DavisVaughan DavisVaughan added the feature a feature request or enhancement label Jul 22, 2022
@mikemahoney218
Copy link
Member

My only concern is that between the 1.0.0 release, TMwR publication, and workshops, it might be a bad time to deprecate one of the "main" functions from the package. But other than that I agree validation_set() is a better name.

@hfrick
Copy link
Member

hfrick commented Apr 28, 2023

We have new functions to create and work with a validation split, following the mental model of a three-way split, rather than a sequence of two binary splits. The function to give you an rset is called validation_set() and we've decided to deprecate validation_split(), starting with the soft-deprecation level.

library(rsample)
data(ames, package = "modeldata")

# the initial split is the 3-way split
first_split <- initial_validation_split(ames)

# get rset for tuning from the 3-way split
rset_for_tuning <- validation_set(first_split)

# access to individual subsets from the initial split
ames_train <- training(first_split)
ames_val <- validation(first_split)
ames_test <- testing(first_split)

# access to individual subsets from the rset
ames_analysis <- analysis(rset_for_tuning$splits[[1]]) # same as training(first_split)
ames_assesment <- assessment(rset_for_tuning$splits[[1]]) # same as validation(first_split)

Created on 2023-04-28 with reprex v2.0.2

@hfrick hfrick changed the title Consider renaming validation_split() Deprecate validation_split() Apr 28, 2023
@hfrick
Copy link
Member

hfrick commented Aug 10, 2023

Additional documentation to check and update, if necessary

  • vignettes
  • tidymodels.org

TMwR can stay as is for now.

extratests should be updated now, if validation_split() is used in other packages (tune?) we'll update the packages as we go

@github-actions
Copy link

github-actions bot commented Sep 2, 2023

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 Sep 2, 2023
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.

3 participants