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

transition from add_tailor(prop) and method to fit.workflow(calibration) #262

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Suggests:
methods,
modeldata (>= 1.0.0),
recipes (>= 1.0.10.9000),
rsample (>= 1.2.1.9000),
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder:
Expand All @@ -54,7 +53,6 @@ Config/Needs/website:
tidyverse/tidytemplate,
yardstick
Remotes:
tidymodels/rsample,
tidymodels/recipes,
tidymodels/parsnip,
tidymodels/tailor,
Expand Down
4 changes: 2 additions & 2 deletions R/post-action-tailor.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#' be used to train the postprocessor.
#'
#' In some situations, randomly splitting `fit.workflow(data)` (with
#' [rsample::initial_split()], for example) is sufficient to prevent data
#' `rsample::initial_split()`, for example) is sufficient to prevent data
#' leakage. However, `fit.workflow(data)` could also have arisen as:
#'
#' ```
Expand All @@ -59,7 +59,7 @@
#' datasets, resulting in the preprocessor and model generating predictions on
#' rows they've seen before. Similarly problematic situations could arise in the
#' context of other resampling situations, like time-based splits.
#' In general, use the [rsample::inner_split()] function to prevent data
#' In general, use the `rsample::inner_split()` function to prevent data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about inner_split() being "internal" or not

#' leakage when resampling; when workflows with postprocessors that require
#' training are passed to the tune package, this is handled internally.
#'
Expand Down
14 changes: 0 additions & 14 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,6 @@ validate_tailor_available <- function(..., call = caller_env()) {
invisible()
}

validate_rsample_available <- function(..., call = caller_env()) {
check_dots_empty()

if (!requireNamespace("rsample", quietly = TRUE)) {
cli_abort(
"The {.pkg rsample} package must be available to add a tailor that
requires training.",
call = call
)
}

invisible()
}

# ------------------------------------------------------------------------------

# https://github.com/r-lib/tidyselect/blob/10e00cea2fff3585fc827b6a7eb5e172acadbb2f/R/utils.R#L109
Expand Down
4 changes: 2 additions & 2 deletions man/add_tailor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/testthat/test-post-action-tailor.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ test_that("postprocessor fit aligns with manually fitted version (no calibration

test_that("postprocessor fit aligns with manually fitted version (with calibration)", {
hfrick marked this conversation as resolved.
Show resolved Hide resolved
skip_if_not_installed("modeldata")
skip_if_not_installed("rsample")

# create example data
y <- seq(0, 7, .1)
Expand Down
Loading