Skip to content

Commit

Permalink
document tailor() arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 13, 2024
1 parent 5fe6fd3 commit 67cf5d3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
25 changes: 16 additions & 9 deletions R/tailor.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#'
Expand Down
25 changes: 16 additions & 9 deletions man/tailor.Rd

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

0 comments on commit 67cf5d3

Please sign in to comment.