diff --git a/R/initial_split.R b/R/initial_split.R index 51d2c5cd..c754e424 100644 --- a/R/initial_split.R +++ b/R/initial_split.R @@ -1,20 +1,20 @@ #' Simple Training/Test Set Splitting #' -#' `initial_split` creates a single binary split of the data into a training -#' set and testing set. `initial_time_split` does the same, but takes the +#' `initial_split()` creates a single binary split of the data into a training +#' set and testing set. `initial_time_split()` does the same, but takes the #' _first_ `prop` samples for training, instead of a random selection. -#' `group_initial_split` creates splits of the data based +#' `group_initial_split()` creates splits of the data based #' on some grouping variable, so that all data in a "group" is assigned to -#' the same split. -#' -#' @details `training` and `testing` are used to extract the resulting data. +#' the same split. +#' +#' @details `training()` and `testing()` are used to extract the resulting data. #' #' @template strata_details #' @inheritParams vfold_cv #' @inheritParams make_strata #' @param prop The proportion of data to be retained for modeling/analysis. #' @export -#' @return An `rsplit` object that can be used with the `training` and `testing` +#' @return An `rsplit` object that can be used with the `training()` and `testing()` #' functions to extract the data in each split. #' @examplesIf rlang::is_installed("modeldata") #' set.seed(1353) diff --git a/R/initial_validation_split.R b/R/initial_validation_split.R index 70d40ec8..0aec03fd 100644 --- a/R/initial_validation_split.R +++ b/R/initial_validation_split.R @@ -9,9 +9,9 @@ #' based on some grouping variable, so that all data in a "group" are assigned #' to the same partition. #' -#' @details `training()`, `validation()`, and `testing()` can be used to extract the +#' @details [training()], [validation()], and [testing()] can be used to extract the #' resulting data sets. -#' Use [`validation_set()`] to create an `rset` object for use with functions from +#' Use [validation_set()] to create an `rset` object for use with functions from #' the tune package such as `tune::tune_grid()`. #' #' @template strata_details diff --git a/R/validation_set.R b/R/validation_set.R index 2ec79da7..db775e02 100644 --- a/R/validation_set.R +++ b/R/validation_set.R @@ -1,6 +1,6 @@ #' Create a Validation Split for Tuning #' -#' `validation_set` creates a the validation split for model tuning. +#' `validation_set()` creates a the validation split for model tuning. #' #' @param split An object of class `initial_validation_split`, such as resulting #' from [initial_validation_split()] or [group_initial_validation_split()]. diff --git a/man/initial_split.Rd b/man/initial_split.Rd index 1e8946f2..07fc96b6 100644 --- a/man/initial_split.Rd +++ b/man/initial_split.Rd @@ -61,19 +61,19 @@ grouping observations with the same value to either the analysis or assessment set within a fold.} } \value{ -An \code{rsplit} object that can be used with the \code{training} and \code{testing} +An \code{rsplit} object that can be used with the \code{training()} and \code{testing()} functions to extract the data in each split. } \description{ -\code{initial_split} creates a single binary split of the data into a training -set and testing set. \code{initial_time_split} does the same, but takes the +\code{initial_split()} creates a single binary split of the data into a training +set and testing set. \code{initial_time_split()} does the same, but takes the \emph{first} \code{prop} samples for training, instead of a random selection. -\code{group_initial_split} creates splits of the data based +\code{group_initial_split()} creates splits of the data based on some grouping variable, so that all data in a "group" is assigned to the same split. } \details{ -\code{training} and \code{testing} are used to extract the resulting data. +\code{training()} and \code{testing()} are used to extract the resulting data. With a \code{strata} argument, the random sampling is conducted \emph{within the stratification variable}. This can help ensure that the diff --git a/man/initial_validation_split.Rd b/man/initial_validation_split.Rd index 0b9d5be8..9017e36e 100644 --- a/man/initial_validation_split.Rd +++ b/man/initial_validation_split.Rd @@ -83,7 +83,7 @@ based on some grouping variable, so that all data in a "group" are assigned to the same partition. } \details{ -\code{training()}, \code{validation()}, and \code{testing()} can be used to extract the +\code{\link[=training]{training()}}, \code{\link[=validation]{validation()}}, and \code{\link[=testing]{testing()}} can be used to extract the resulting data sets. Use \code{\link[=validation_set]{validation_set()}} to create an \code{rset} object for use with functions from the tune package such as \code{tune::tune_grid()}. diff --git a/man/validation_set.Rd b/man/validation_set.Rd index b5e3fc2a..98de1f31 100644 --- a/man/validation_set.Rd +++ b/man/validation_set.Rd @@ -35,7 +35,7 @@ An tibble with classes \code{validation_set}, \code{rset}, \code{tbl_df}, \code{ column called \code{id} that has a character string with the resample identifier. } \description{ -\code{validation_set} creates a the validation split for model tuning. +\code{validation_set()} creates a the validation split for model tuning. } \examples{ set.seed(1353)