Skip to content

Commit

Permalink
Merge pull request #241 from tidymodels/RC-1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt authored Jan 23, 2025
2 parents 2fd60a0 + a9b1780 commit 5aedbb8
Show file tree
Hide file tree
Showing 34 changed files with 133 additions and 131 deletions.
12 changes: 5 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: embed
Title: Extra Recipes for Encoding Predictors
Version: 1.1.4.9000
Version: 1.1.5.9000
Authors@R: c(
person("Emil", "Hvitfeldt", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-0679-1945")),
Expand All @@ -10,15 +10,15 @@ Authors@R: c(
)
Description: Predictors can be converted to one or more numeric
representations using a variety of methods. Effect encodings using
simple generalized linear models <arXiv:1611.09477> or nonlinear
models <arXiv:1604.06737> can be used. There are also functions for
dimension reduction and other approaches.
simple generalized linear models <doi:10.48550/arXiv.1611.09477> or
nonlinear models <doi:10.48550/arXiv.1604.06737> can be used. There
are also functions for dimension reduction and other approaches.
License: MIT + file LICENSE
URL: https://embed.tidymodels.org, https://github.com/tidymodels/embed
BugReports: https://github.com/tidymodels/embed/issues
Depends:
R (>= 3.6),
recipes (>= 1.1.0.9000)
recipes (>= 1.1.0)
Imports:
cli,
glue,
Expand Down Expand Up @@ -53,8 +53,6 @@ Suggests:
testthat (>= 3.0.0),
VBsparsePCA,
xgboost
Remotes:
tidymodels/recipes
ByteCompile: true
Config/Needs/website: tidymodels, ggiraph, tidyverse/tidytemplate, reticulate
Config/testthat/edition: 3
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# embed (development version)

* `step_umap()` has tunable `initial` and `target_weight` arguments. [#223](https://github.com/tidymodels/embed/issues/223), [#222](https://github.com/tidymodels/embed/issues/222))
# embed 1.1.5

## Improvements

* `step_umap()` has tunable `initial` and `target_weight` arguments. (#223, #222)

* All messages, warnings and errors has been translated to use {cli} package (#153, #155).

# embed 1.1.4

Expand Down
6 changes: 3 additions & 3 deletions R/collapse_cart.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @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 which variables are
#' affected by the step. See [selections()] for more details. For the `tidy`
#' affected by the step. See [recipes::selections] for more details. For the `tidy`
#' method, these are not currently used.
#' @param outcome A call to `vars` to specify which variable is used as the
#' outcome to train CART models in order to pool factor levels.
Expand All @@ -21,7 +21,7 @@
#' complex trees.
#' @param results A list of results to convert to new factor levels.
#' @param skip A logical. Should the step be skipped when the recipe is baked by
#' [bake()]? While all operations are baked when [prep()] is run, some
#' [recipes::bake]? While all operations are baked when [recipes::prep] is run, some
#' operations may not be able to be conducted on new data (e.g. processing the
#' outcome variable(s)). Care should be taken when using `skip = TRUE` as it
#' may affect the computations for subsequent operations
Expand All @@ -42,7 +42,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms`, `old`, `new`, and `id`:
#'
#' \describe{
Expand Down
6 changes: 3 additions & 3 deletions R/collapse_stringdist.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#' @inheritParams recipes::step_center
#' @param ... One or more selector functions to choose which variables are
#' affected by the step. See [selections()] for more details. For the `tidy`
#' affected by the step. See [recipes::selections] for more details. For the `tidy`
#' method, these are not currently used.
#' @param role Not used by this step since no new variables are created.
#' @param distance Integer, value to determine which strings should be collapsed
Expand All @@ -17,7 +17,7 @@
#' [stringdist::stringdistmatrix()] such as `weight`, `q`, `p`, and `bt`, that
#' are used for different values of `method`.
#' @param results A list denoting the way the labels should be collapses is
#' stored here once this preprocessing step has be trained by [prep()].
#' stored here once this preprocessing step has be trained by [recipes::prep].
#' @param columns A character string of variable names that will be populated
#' (eventually) by the `terms` argument.
#' @return An updated version of `recipe` with the new step added to the
Expand All @@ -28,7 +28,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms`, `from`, `to`, and `id`:
#'
#' \describe{
Expand Down
4 changes: 2 additions & 2 deletions R/discretize_cart.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @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 which variables are
#' affected by the step. See [selections()] for more details.
#' affected by the step. See [recipes::selections] for more details.
#' @param role Defaults to `"predictor"`.
#' @param trained A logical to indicate if the quantities for preprocessing have
#' been estimated.
Expand Down Expand Up @@ -46,7 +46,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms`, `value`, and `id`:
#'
#' \describe{
Expand Down
4 changes: 2 additions & 2 deletions R/discretize_xgb.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @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 which variables are
#' affected by the step. See [selections()] for more details.
#' affected by the step. See [recipes::selections] for more details.
#' @param role Defaults to `"predictor"`.
#' @param trained A logical to indicate if the quantities for preprocessing have
#' been estimated.
Expand Down Expand Up @@ -63,7 +63,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms`, `value`, and `id`:
#'
#' \describe{
Expand Down
2 changes: 1 addition & 1 deletion R/embed.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' a number of columns with embedding information, and columns `terms`,
#' `levels`, and `id`:
#'
Expand Down
2 changes: 1 addition & 1 deletion R/feature_hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms` and `id`:
#'
#' \describe{
Expand Down
2 changes: 1 addition & 1 deletion R/lencode_bayes.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `level`, `value`, `terms`, and `id`:
#'
#' \describe{
Expand Down
2 changes: 1 addition & 1 deletion R/lencode_glm.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `level`, `value`, `terms`, and `id`:
#'
#' \describe{
Expand Down
2 changes: 1 addition & 1 deletion R/lencode_mixed.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `level`, `value`, `terms`, and `id`:
#'
#' \describe{
Expand Down
6 changes: 3 additions & 3 deletions R/pca_sparse.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @inheritParams recipes::step_pca
#' @inherit step_lencode_bayes return
#' @param ... One or more selector functions to choose which variables will be
#' used to compute the components. See [selections()] for more details. For
#' used to compute the components. See [recipes::selections] for more details. For
#' the `tidy` method, these are not currently used.
#' @param role For model terms created by this step, what analysis role should
#' they be assigned? By default, the function assumes that the new principal
Expand All @@ -20,7 +20,7 @@
#' output. Defaults to `FALSE`.
#' @param options A list of options to the default method for [irlba::ssvd()].
#' @param res The rotation matrix once this preprocessing step has be trained by
#' [prep()].
#' [recipes::prep].
#' @param prefix A character string that will be the prefix to the resulting new
#' variables. See notes below.
#' @return An updated version of `recipe` with the new step added to the
Expand All @@ -46,7 +46,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms`, `value`, `component`, and `id`:
#'
#' \describe{
Expand Down
6 changes: 3 additions & 3 deletions R/pca_sparse_bayes.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @inheritParams recipes::step_pca
#' @inherit step_lencode_bayes return
#' @param ... One or more selector functions to choose which variables will be
#' used to compute the components. See [selections()] for more details. For
#' used to compute the components. See [recipes::selections] for more details. For
#' the `tidy` method, these are not currently used.
#' @param role For model terms created by this step, what analysis role should
#' they be assigned? By default, the function assumes that the new principal
Expand All @@ -25,7 +25,7 @@
#' @param options A list of options to the default method for
#' [VBsparsePCA::VBsparsePCA()].
#' @param res The rotation matrix once this preprocessing step has been trained
#' by [prep()].
#' by [recipes::prep].
#' @param prefix A character string that will be the prefix to the resulting new
#' variables. See notes below.
#' @return An updated version of `recipe` with the new step added to the
Expand Down Expand Up @@ -65,7 +65,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms`, `value`, `component`, and `id`:
#'
#' \describe{
Expand Down
8 changes: 4 additions & 4 deletions R/pca_truncated.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' `center = FALSE`, `scale. = FALSE`, and `tol = NULL`. **Note** that the
#' argument `x` should not be passed here (or at all).
#' @param res The [irlba::prcomp_irlba()] object is stored here once this
#' preprocessing step has be trained by [prep()].
#' preprocessing step has be trained by [recipes::prep].
#' @template step-return
#' @details
#'
Expand All @@ -24,8 +24,8 @@
#'
#' It is advisable to standardize the variables prior to running PCA. Here, each
#' variable will be centered and scaled prior to the PCA calculation. This can
#' be changed using the `options` argument or by using [step_center()] and
#' [step_scale()].
#' be changed using the `options` argument or by using [recipes::step_center()] and
#' [recipes::step_scale()].
#'
#' ```{r, echo = FALSE, results="asis"}
#' prefix <- "PC"
Expand All @@ -35,7 +35,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step two things can happen depending
#' When you [`tidy()`][recipes::tidy.recipe] this step two things can happen depending
#' the `type` argument. If `type = "coef"` a tibble returned with 4 columns
#' `terms`, `value`, `component` , and `id`:
#'
Expand Down
6 changes: 3 additions & 3 deletions R/umap.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#' `n_threads` are set.
#' @param seed Two integers to control the random numbers used by the numerical
#' methods. The default pulls from the main session's stream of numbers and
#' will give reproducible results if the seed is set prior to calling [prep()]
#' or [bake()].
#' will give reproducible results if the seed is set prior to calling [recipes::prep]
#' or [recipes::bake].
#' @param retain Use `keep_original_cols` instead to specify whether the
#' original predictors should be retained along with the new embedding
#' variables.
Expand All @@ -57,7 +57,7 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms` and `id`:
#'
#' \describe{
Expand Down
8 changes: 4 additions & 4 deletions R/woe.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @inheritParams recipes::step_pca
#' @inherit step_center return
#' @param ... One or more selector functions to choose which variables will be
#' used to compute the components. See [selections()] for more details. For
#' used to compute the components. See [recipes::selections] for more details. For
#' the `tidy` method, these are not currently used.
#' @param role For model terms created by this step, what analysis role should
#' they be assigned?. By default, the function assumes that the new woe
Expand Down Expand Up @@ -45,7 +45,7 @@
#' with a binary outcome. To apply it on numerical predictors, it is advisable
#' to discretize the variables prior to running WoE. Here, each variable will be
#' binarized to have woe associated later. This can achieved by using
#' [step_discretize()].
#' [recipes::step_discretize()].
#'
#' The argument `Laplace` is an small quantity added to the proportions of 1's
#' and 0's with the goal to avoid log(p/0) or log(0/p) results. The numerical
Expand All @@ -62,12 +62,12 @@
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble with columns `terms`
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble with columns `terms`
#' (the selectors or variables selected), `value`, `n_tot`, `n_bad`, `n_good`,
#' `p_bad`, `p_good`, `woe` and `outcome` is returned.. See [dictionary()] for
#' more information.
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble is returned with
#' When you [`tidy()`][recipes::tidy.recipe] this step, a tibble is returned with
#' columns `terms` `value`, `n_tot`, `n_bad`, `n_good`, `p_bad`, `p_good`, `woe`
#' and `outcome` and `id`:
#'
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pak::pak("tidymodels/embed")

This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question).
- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://forum.posit.co/new-topic?category_id=15&tags=tidymodels,question).

- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/embed/issues).

Expand Down
Loading

0 comments on commit 5aedbb8

Please sign in to comment.