From dd254f8598ab27a14a9ba979abb580e9b3a18da2 Mon Sep 17 00:00:00 2001 From: "Simon P. Couch" Date: Thu, 19 Sep 2024 14:52:54 -0500 Subject: [PATCH] correct interpretation of `add_tailor(prop)` (#248) also corrects documentation on default value. --- R/fit.R | 4 +++- R/post-action-tailor.R | 2 +- man/add_tailor.Rd | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/R/fit.R b/R/fit.R index 108b009f..5bc4719e 100644 --- a/R/fit.R +++ b/R/fit.R @@ -103,10 +103,12 @@ make_inner_split <- function(object, data) { class = if (is.null(method)) "mc_split" else method ) + # add_tailor(prop) is the proportion to train the postprocessor, while + # rsample::mc_cv(prop) is the proportion to train the model (#247) prop <- object$post$actions$tailor$prop rsample::inner_split( mocked_split, - list(prop = if (is.null(prop)) 2/3 else prop) + list(prop = if (is.null(prop)) 2/3 else 1 - prop) ) } diff --git a/R/post-action-tailor.R b/R/post-action-tailor.R index 68dc503b..84e85e22 100644 --- a/R/post-action-tailor.R +++ b/R/post-action-tailor.R @@ -20,7 +20,7 @@ #' @param prop The proportion of the data in [fit.workflow()] that should be #' held back specifically for estimating the postprocessor. Only relevant for #' postprocessors that require estimation---see section Data Usage below to -#' learn more. Defaults to 2/3. +#' learn more. Defaults to 1/3. #' #' @param method The method with which to split the data in [fit.workflow()], #' as a character vector. Only relevant for postprocessors that diff --git a/man/add_tailor.Rd b/man/add_tailor.Rd index 4002db4a..34d99d35 100644 --- a/man/add_tailor.Rd +++ b/man/add_tailor.Rd @@ -22,7 +22,7 @@ will handle training internally.} \item{prop}{The proportion of the data in \code{\link[=fit.workflow]{fit.workflow()}} that should be held back specifically for estimating the postprocessor. Only relevant for postprocessors that require estimation---see section Data Usage below to -learn more. Defaults to 2/3.} +learn more. Defaults to 1/3.} \item{method}{The method with which to split the data in \code{\link[=fit.workflow]{fit.workflow()}}, as a character vector. Only relevant for postprocessors that