Skip to content

Commit

Permalink
Fixes tidymodels#475 - Documentation edits-decluttering the top of th…
Browse files Browse the repository at this point in the history
…e references page
  • Loading branch information
laurabrianna committed Aug 15, 2024
1 parent 5eb77d4 commit 79e7324
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
8 changes: 5 additions & 3 deletions R/initial_split.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#' `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.
#' `training` and `testing` are used to extract the resulting data.
#'
#' @details `training` and `testing` are used to extract the resulting data.
#'
#' @template strata_details
#' @inheritParams vfold_cv
#' @inheritParams make_strata
Expand Down Expand Up @@ -176,12 +178,12 @@ group_initial_split <- function(data, group, prop = 3 / 4, ..., strata = NULL, p
attrib <- .get_split_args(res, allow_strata_false = TRUE)

res <- res$splits[[1]]

attrib$times <- NULL
for (i in names(attrib)) {
attr(res, i) <- attrib[[i]]
}
class(res) <- c("group_initial_split", "initial_split", class(res))

res
}
3 changes: 2 additions & 1 deletion R/initial_validation_split.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#' `group_initial_validation_split()` creates similar random splits of the data
#' based on some grouping variable, so that all data in a "group" are assigned
#' to the same partition.
#' `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
#' the tune package such as `tune::tune_grid()`.
Expand Down
2 changes: 2 additions & 0 deletions R/validation_set.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#' Create a Validation Split for 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()].
#' @param x An `rsplit` object produced by `validation_set()`.
Expand Down
3 changes: 2 additions & 1 deletion man/initial_split.Rd

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

5 changes: 3 additions & 2 deletions man/initial_validation_split.Rd

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

2 changes: 1 addition & 1 deletion man/validation_set.Rd

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

0 comments on commit 79e7324

Please sign in to comment.