R build
status Codecov test
coverage CRAN_Status_Badge Downloads


embed has extra steps for the recipes package for embedding predictors into one or more numeric columns. Almost all of the preprocessing methods are supervised.

These steps are available here in a separate package because the step dependencies, rstanarm, lme4, and keras, are fairly heavy.

Some steps handle categorical predictors:

For numeric predictors:

Some references for these methods are:

Getting Started

There are two articles that walk through how to use these embedding steps, using generalized linear models and neural networks built via TensorFlow.


To install the package:


Note that to use some steps, you will also have to install other packages such as rstanarm and lme4. For all of the steps to work, you may want to use:

install.packages(c("rpart", "xgboost", "rstanarm", "lme4"))

To get a bug fix or to use a feature from the development version, you can install the development version of this package from GitHub.

# install.packages("remotes")


This project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

tidymodels/embed documentation built on Nov. 26, 2021, 3:02 p.m.