diff --git a/R/tailor.R b/R/tailor.R index 8932a47..49a6ef9 100644 --- a/R/tailor.R +++ b/R/tailor.R @@ -18,15 +18,22 @@ #' with the [tidymodels](https://tidymodels.org) framework; for greatest ease #' of use, situate tailors in model workflows with [workflows::add_tailor()]. #' -#' @param type The model sub-type. Possible values are `"unknown"`, `"regression"`, -#' `"binary"`, or `"multiclass"`. -#' @param outcome The name of the outcome variable. -#' @param estimate The name of the point estimate (e.g. predicted class). In -#' tidymodels, this corresponds to column names `.pred`, `.pred_class`, or -#' `.pred_time`. -#' @param probabilities The names of class probability estimates (if any). For -#' classification, these should be given in the order of the factor levels of -#' the `estimate`. +#' @param type Character. The model sub-mode. Possible values are +#' `"unknown"`, `"regression"`, `"binary"`, or `"multiclass"`. Only required +#' when used independently of [workflows::add_tailor()]. +#' @param outcome <[`tidy-select`][dplyr::dplyr_tidy_select]> Only required +#' when used independently of [workflows::add_tailor()], and can also be passed +#' at `fit()` time instead. The column name of the outcome variable. +#' @param estimate <[`tidy-select`][dplyr::dplyr_tidy_select]> Only required +#' when used independently of [workflows::add_tailor()], and can also be passed +#' at `fit()` time instead. The column name of the point estimate (e.g. predicted +#' class), In tidymodels, this corresponds to column names `.pred`, +#' `.pred_class`, or `.pred_time`. +#' @param probabilities <[`tidy-select`][dplyr::dplyr_tidy_select]> Only required +#' when used independently of [workflows::add_tailor()] for the `"binary"` or +#' `"multiclass"` types, and can also be passed at `fit()` time instead. +#' The column names of class probability estimates. These should be given in +#' the order of the factor levels of the `estimate`. #' @examplesIf rlang::is_installed("modeldata") #' library(modeldata) #' diff --git a/man/tailor.Rd b/man/tailor.Rd index 0f1158d..63c7f7d 100644 --- a/man/tailor.Rd +++ b/man/tailor.Rd @@ -7,18 +7,25 @@ tailor(type = "unknown", outcome = NULL, estimate = NULL, probabilities = NULL) } \arguments{ -\item{type}{The model sub-type. Possible values are \code{"unknown"}, \code{"regression"}, -\code{"binary"}, or \code{"multiclass"}.} +\item{type}{Character. The model sub-mode. Possible values are +\code{"unknown"}, \code{"regression"}, \code{"binary"}, or \code{"multiclass"}. Only required +when used independently of \code{\link[workflows:add_tailor]{workflows::add_tailor()}}.} -\item{outcome}{The name of the outcome variable.} +\item{outcome}{<\code{\link[dplyr:dplyr_tidy_select]{tidy-select}}> Only required +when used independently of \code{\link[workflows:add_tailor]{workflows::add_tailor()}}, and can also be passed +at \code{fit()} time instead. The column name of the outcome variable.} -\item{estimate}{The name of the point estimate (e.g. predicted class). In -tidymodels, this corresponds to column names \code{.pred}, \code{.pred_class}, or -\code{.pred_time}.} +\item{estimate}{<\code{\link[dplyr:dplyr_tidy_select]{tidy-select}}> Only required +when used independently of \code{\link[workflows:add_tailor]{workflows::add_tailor()}}, and can also be passed +at \code{fit()} time instead. The column name of the point estimate (e.g. predicted +class), In tidymodels, this corresponds to column names \code{.pred}, +\code{.pred_class}, or \code{.pred_time}.} -\item{probabilities}{The names of class probability estimates (if any). For -classification, these should be given in the order of the factor levels of -the \code{estimate}.} +\item{probabilities}{<\code{\link[dplyr:dplyr_tidy_select]{tidy-select}}> Only required +when used independently of \code{\link[workflows:add_tailor]{workflows::add_tailor()}} for the \code{"binary"} or +\code{"multiclass"} types, and can also be passed at \code{fit()} time instead. +The column names of class probability estimates. These should be given in +the order of the factor levels of the \code{estimate}.} } \description{ Tailors compose iterative adjustments to model predictions. After