From 77b21eb6ed2fc93a9524277870cf9faabd9f4f34 Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Tue, 20 Jun 2023 15:33:16 -0700 Subject: [PATCH] standardize description for recipes steps --- R/collapse_cart.R | 2 +- R/collapse_stringdist.R | 2 +- R/discretize_cart.R | 2 +- R/discretize_xgb.R | 2 +- R/embed.R | 4 ++-- R/feature_hash.R | 2 +- R/lencode_bayes.R | 2 +- R/lencode_glm.R | 2 +- R/lencode_mixed.R | 2 +- R/pca_truncated.R | 2 +- R/umap.R | 2 +- R/woe.R | 2 +- man/step_collapse_cart.Rd | 2 +- man/step_collapse_stringdist.Rd | 2 +- man/step_discretize_cart.Rd | 2 +- man/step_discretize_xgb.Rd | 2 +- man/step_embed.Rd | 2 +- man/step_feature_hash.Rd | 2 +- man/step_lencode_bayes.Rd | 2 +- man/step_lencode_glm.Rd | 2 +- man/step_lencode_mixed.Rd | 2 +- man/step_pca_truncated.Rd | 6 +++--- man/step_umap.Rd | 2 +- man/step_woe.Rd | 2 +- 24 files changed, 27 insertions(+), 27 deletions(-) diff --git a/R/collapse_cart.R b/R/collapse_cart.R index e6c32d2e..6cc85303 100644 --- a/R/collapse_cart.R +++ b/R/collapse_cart.R @@ -1,6 +1,6 @@ #' Supervised Collapsing of Factor Levels #' -#' `step_collapse_cart` creates a *specification* of a recipe step that can +#' `step_collapse_cart()` creates a *specification* of a recipe step that can #' collapse factor levels into a smaller set using a supervised tree. #' #' @param recipe A recipe object. The step will be added to the sequence of diff --git a/R/collapse_stringdist.R b/R/collapse_stringdist.R index 5fec6948..5e8fcdcf 100644 --- a/R/collapse_stringdist.R +++ b/R/collapse_stringdist.R @@ -1,6 +1,6 @@ #' collapse factor levels using stringdist #' -#' `step_collapse_stringdist` creates a *specification* of a recipe step that +#' `step_collapse_stringdist()` creates a *specification* of a recipe step that #' will collapse factor levels that have a low stringdist between them. #' #' @inheritParams recipes::step_center diff --git a/R/discretize_cart.R b/R/discretize_cart.R index 6cf18b9b..223469f9 100644 --- a/R/discretize_cart.R +++ b/R/discretize_cart.R @@ -1,6 +1,6 @@ #' Discretize numeric variables with CART #' -#' `step_discretize_cart` creates a *specification* of a recipe step that will +#' `step_discretize_cart()` creates a *specification* of a recipe step that will #' discretize numeric data (e.g. integers or doubles) into bins in a supervised #' way using a CART model. #' diff --git a/R/discretize_xgb.R b/R/discretize_xgb.R index ac76d63d..0929d8f4 100644 --- a/R/discretize_xgb.R +++ b/R/discretize_xgb.R @@ -1,6 +1,6 @@ #' Discretize numeric variables with XgBoost #' -#' `step_discretize_xgb` creates a *specification* of a recipe step that will +#' `step_discretize_xgb()` creates a *specification* of a recipe step that will #' discretize numeric data (e.g. integers or doubles) into bins in a supervised #' way using an XgBoost model. #' diff --git a/R/embed.R b/R/embed.R index 33faa193..33ad894b 100644 --- a/R/embed.R +++ b/R/embed.R @@ -1,10 +1,10 @@ #' Encoding Factors into Multiple Columns #' -#' `step_embed` creates a *specification* of a recipe step that will convert a +#' `step_embed()` creates a *specification* of a recipe step that will convert a #' nominal (i.e. factor) predictor into a set of scores derived from a #' tensorflow model via a word-embedding model. `embed_control` is a simple #' wrapper for setting default options. -#' +#' #' @param recipe A recipe object. The step will be added to the sequence of #' operations for this recipe. #' @param ... One or more selector functions to choose variables. For diff --git a/R/feature_hash.R b/R/feature_hash.R index 020d139c..51e9fca2 100644 --- a/R/feature_hash.R +++ b/R/feature_hash.R @@ -2,7 +2,7 @@ #' #' @description `r lifecycle::badge("soft-deprecated")` #' -#' `step_feature_hash` is being deprecated in favor of +#' `step_feature_hash()` is being deprecated in favor of #' [textrecipes::step_dummy_hash()]. This function creates a *specification* #' of a recipe step that will convert nominal data (e.g. character or factors) #' into one or more numeric binary columns using the levels of the original diff --git a/R/lencode_bayes.R b/R/lencode_bayes.R index f633ea90..ef2ced74 100644 --- a/R/lencode_bayes.R +++ b/R/lencode_bayes.R @@ -1,7 +1,7 @@ #' Supervised Factor Conversions into Linear Functions using Bayesian Likelihood #' Encodings #' -#' `step_lencode_bayes` creates a *specification* of a recipe step that will +#' `step_lencode_bayes()` creates a *specification* of a recipe step that will #' convert a nominal (i.e. factor) predictor into a single set of scores derived #' from a generalized linear model estimated using Bayesian analysis. #' diff --git a/R/lencode_glm.R b/R/lencode_glm.R index b50d1bb3..8d68f727 100644 --- a/R/lencode_glm.R +++ b/R/lencode_glm.R @@ -1,7 +1,7 @@ #' Supervised Factor Conversions into Linear Functions using Likelihood #' Encodings #' -#' `step_lencode_glm` creates a *specification* of a recipe step that will +#' `step_lencode_glm()` creates a *specification* of a recipe step that will #' convert a nominal (i.e. factor) predictor into a single set of scores derived #' from a generalized linear model. #' diff --git a/R/lencode_mixed.R b/R/lencode_mixed.R index 4af4dc61..bcb3e31b 100644 --- a/R/lencode_mixed.R +++ b/R/lencode_mixed.R @@ -1,7 +1,7 @@ #' Supervised Factor Conversions into Linear Functions using Bayesian Likelihood #' Encodings #' -#' `step_lencode_mixed` creates a *specification* of a recipe step that will +#' `step_lencode_mixed()` creates a *specification* of a recipe step that will #' convert a nominal (i.e. factor) predictor into a single set of scores derived #' from a generalized linear mixed model. #' diff --git a/R/pca_truncated.R b/R/pca_truncated.R index e14df80c..f4c4db15 100644 --- a/R/pca_truncated.R +++ b/R/pca_truncated.R @@ -1,6 +1,6 @@ #' Truncated PCA Signal Extraction #' -#' `step_pca_truncated` creates a *specification* of a recipe step that will +#' `step_pca_truncated()` creates a *specification* of a recipe step that will #' convert numeric data into one or more principal components. It is truncated #' as it only calculates the number of components it is asked instead of all of #' them as is done in [recipes::step_pca()]. diff --git a/R/umap.R b/R/umap.R index bcac316d..c2eb6a90 100644 --- a/R/umap.R +++ b/R/umap.R @@ -1,7 +1,7 @@ #' Supervised and unsupervised uniform manifold approximation and projection #' (UMAP) #' -#' `step_umap` creates a *specification* of a recipe step that will project a +#' `step_umap()` creates a *specification* of a recipe step that will project a #' set of features into a smaller space. #' #' @inheritParams recipes::step_pca diff --git a/R/woe.R b/R/woe.R index 71d9f870..4186731c 100644 --- a/R/woe.R +++ b/R/woe.R @@ -1,6 +1,6 @@ #' Weight of evidence transformation #' -#' `step_woe` creates a *specification* of a recipe step that will transform +#' `step_woe()` creates a *specification* of a recipe step that will transform #' nominal data into its numerical transformation based on weights of evidence #' against a binary outcome. #' diff --git a/man/step_collapse_cart.Rd b/man/step_collapse_cart.Rd index 052774df..7dbf7049 100644 --- a/man/step_collapse_cart.Rd +++ b/man/step_collapse_cart.Rd @@ -55,7 +55,7 @@ may affect the computations for subsequent operations} An updated recipe step. } \description{ -\code{step_collapse_cart} creates a \emph{specification} of a recipe step that can +\code{step_collapse_cart()} creates a \emph{specification} of a recipe step that can collapse factor levels into a smaller set using a supervised tree. } \details{ diff --git a/man/step_collapse_stringdist.Rd b/man/step_collapse_stringdist.Rd index 340cc73b..28b58a27 100644 --- a/man/step_collapse_stringdist.Rd +++ b/man/step_collapse_stringdist.Rd @@ -63,7 +63,7 @@ sequence of existing steps (if any). For the \code{tidy} method, a tibble with columns \code{terms} (the columns that will be affected) and \code{base}. } \description{ -\code{step_collapse_stringdist} creates a \emph{specification} of a recipe step that +\code{step_collapse_stringdist()} creates a \emph{specification} of a recipe step that will collapse factor levels that have a low stringdist between them. } \section{Tidying}{ diff --git a/man/step_discretize_cart.Rd b/man/step_discretize_cart.Rd index 0d9635a2..34a9084e 100644 --- a/man/step_discretize_cart.Rd +++ b/man/step_discretize_cart.Rd @@ -58,7 +58,7 @@ An updated version of \code{recipe} with the new step added to the sequence of any existing operations. } \description{ -\code{step_discretize_cart} creates a \emph{specification} of a recipe step that will +\code{step_discretize_cart()} creates a \emph{specification} of a recipe step that will discretize numeric data (e.g. integers or doubles) into bins in a supervised way using a CART model. } diff --git a/man/step_discretize_xgb.Rd b/man/step_discretize_xgb.Rd index 85ebd57c..ddd9ff5c 100644 --- a/man/step_discretize_xgb.Rd +++ b/man/step_discretize_xgb.Rd @@ -69,7 +69,7 @@ An updated version of \code{recipe} with the new step added to the sequence of any existing operations. } \description{ -\code{step_discretize_xgb} creates a \emph{specification} of a recipe step that will +\code{step_discretize_xgb()} creates a \emph{specification} of a recipe step that will discretize numeric data (e.g. integers or doubles) into bins in a supervised way using an XgBoost model. } diff --git a/man/step_embed.Rd b/man/step_embed.Rd index 6056afc7..c123c3cc 100644 --- a/man/step_embed.Rd +++ b/man/step_embed.Rd @@ -92,7 +92,7 @@ columns \code{terms} (the selectors or variables for encoding), \code{level} (th factor levels), and several columns containing \code{embed} in the name. } \description{ -\code{step_embed} creates a \emph{specification} of a recipe step that will convert a +\code{step_embed()} creates a \emph{specification} of a recipe step that will convert a nominal (i.e. factor) predictor into a set of scores derived from a tensorflow model via a word-embedding model. \code{embed_control} is a simple wrapper for setting default options. diff --git a/man/step_feature_hash.Rd b/man/step_feature_hash.Rd index f2094e3b..fb797937 100644 --- a/man/step_feature_hash.Rd +++ b/man/step_feature_hash.Rd @@ -59,7 +59,7 @@ sequence of any existing operations. \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#soft-deprecated}{\figure{lifecycle-soft-deprecated.svg}{options: alt='[Soft-deprecated]'}}}{\strong{[Soft-deprecated]}} -\code{step_feature_hash} is being deprecated in favor of +\code{step_feature_hash()} is being deprecated in favor of \code{\link[textrecipes:step_dummy_hash]{textrecipes::step_dummy_hash()}}. This function creates a \emph{specification} of a recipe step that will convert nominal data (e.g. character or factors) into one or more numeric binary columns using the levels of the original diff --git a/man/step_lencode_bayes.Rd b/man/step_lencode_bayes.Rd index 0a56ec49..87f0f7ff 100644 --- a/man/step_lencode_bayes.Rd +++ b/man/step_lencode_bayes.Rd @@ -58,7 +58,7 @@ columns \code{terms} (the selectors or variables for encoding), \code{level} (th factor levels), and \code{value} (the encodings). } \description{ -\code{step_lencode_bayes} creates a \emph{specification} of a recipe step that will +\code{step_lencode_bayes()} creates a \emph{specification} of a recipe step that will convert a nominal (i.e. factor) predictor into a single set of scores derived from a generalized linear model estimated using Bayesian analysis. } diff --git a/man/step_lencode_glm.Rd b/man/step_lencode_glm.Rd index 78e7c353..a6901d39 100644 --- a/man/step_lencode_glm.Rd +++ b/man/step_lencode_glm.Rd @@ -51,7 +51,7 @@ columns \code{terms} (the selectors or variables for encoding), \code{level} (th factor levels), and \code{value} (the encodings). } \description{ -\code{step_lencode_glm} creates a \emph{specification} of a recipe step that will +\code{step_lencode_glm()} creates a \emph{specification} of a recipe step that will convert a nominal (i.e. factor) predictor into a single set of scores derived from a generalized linear model. } diff --git a/man/step_lencode_mixed.Rd b/man/step_lencode_mixed.Rd index 9de76765..c6af3397 100644 --- a/man/step_lencode_mixed.Rd +++ b/man/step_lencode_mixed.Rd @@ -55,7 +55,7 @@ columns \code{terms} (the selectors or variables for encoding), \code{level} (th factor levels), and \code{value} (the encodings). } \description{ -\code{step_lencode_mixed} creates a \emph{specification} of a recipe step that will +\code{step_lencode_mixed()} creates a \emph{specification} of a recipe step that will convert a nominal (i.e. factor) predictor into a single set of scores derived from a generalized linear mixed model. } diff --git a/man/step_pca_truncated.Rd b/man/step_pca_truncated.Rd index 7d5dc960..02fcb1b9 100644 --- a/man/step_pca_truncated.Rd +++ b/man/step_pca_truncated.Rd @@ -47,8 +47,8 @@ argument \code{x} should not be passed here (or at all).} \item{res}{The \code{\link[irlba:prcomp_irlba]{irlba::prcomp_irlba()}} object is stored here once this preprocessing step has be trained by \code{\link[=prep]{prep()}}.} -\item{columns}{A character string of variable names that will -be populated elsewhere.} +\item{columns}{A character string of the selected variable names. This field +is a placeholder and will be populated once \code{\link[recipes:prep]{prep()}} is used.} \item{prefix}{A character string for the prefix of the resulting new variables. See notes below.} @@ -70,7 +70,7 @@ An updated version of \code{recipe} with the new step added to the sequence of any existing operations. } \description{ -\code{step_pca_truncated} creates a \emph{specification} of a recipe step that will +\code{step_pca_truncated()} creates a \emph{specification} of a recipe step that will convert numeric data into one or more principal components. It is truncated as it only calculates the number of components it is asked instead of all of them as is done in \code{\link[recipes:step_pca]{recipes::step_pca()}}. diff --git a/man/step_umap.Rd b/man/step_umap.Rd index f59b6db1..7c74833d 100644 --- a/man/step_umap.Rd +++ b/man/step_umap.Rd @@ -100,7 +100,7 @@ An updated version of \code{recipe} with the new step added to the sequence of any existing operations. } \description{ -\code{step_umap} creates a \emph{specification} of a recipe step that will project a +\code{step_umap()} creates a \emph{specification} of a recipe step that will project a set of features into a smaller space. } \details{ diff --git a/man/step_woe.Rd b/man/step_woe.Rd index 7f5fcef3..a2ad86a0 100644 --- a/man/step_woe.Rd +++ b/man/step_woe.Rd @@ -61,7 +61,7 @@ sequence of existing steps (if any). For the \code{tidy} method, a tibble with the woe dictionary used to map categories with woe values. } \description{ -\code{step_woe} creates a \emph{specification} of a recipe step that will transform +\code{step_woe()} creates a \emph{specification} of a recipe step that will transform nominal data into its numerical transformation based on weights of evidence against a binary outcome. }