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

Fixes #475 - Documentation edits-decluttering the top of the refs page #519

Merged
merged 3 commits into from
Sep 4, 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
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.
Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to keep those where they were so not moving them to @details but it would be lovely if they gained a () at the end, so e.g. training() instead of training - then they are easier to identify as functions!

#'
#' @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.
Copy link
Member

Choose a reason for hiding this comment

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

This would also look great with a set of () at the end

#'
#' @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.

Loading