← 开源

Pipeable steps for feature engineering and data preprocessing to prepare for modeling

R
增长势头
+024 小时新增 Star0.0%
626
Star
130
Fork
+0
本周
74
贡献者
创建于 2016-12-16 · 更新于 2026-11-27 · 今日第 20329 名
主要开发者
README

recipes

Introduction

With recipes, you can use dplyr-like pipeable sequences of feature engineering steps to get your data ready for modeling. For example, to create a recipe containing an outcome plus two numeric predictors and then center and scale (“normalize”) the predictors:

library(recipes)
data(ad_data, package = "modeldata")

ad_rec <- recipe(Class ~ tau + VEGF, data = ad_data) |>
  step_normalize(all_numeric_predictors())

ad_rec

More information on recipes can be found at the Get Started page of tidymodels.org.

You may consider recipes as an alternative method for creating and preprocessing design matrices (also known as model matrices) that can be used for modeling or visualization. While R already has long-standing methods for creating such matrices (e.g. formulas and model.matrix), there are some limitations to what the existing infrastructure can do.

Installation

There are several ways to install recipes:

# The easiest way to get recipes is to install all of tidymodels:
install.packages("tidymodels")

# Alternatively, install just recipes:
install.packages("recipes")

# Or the development version from GitHub:
# install.packages("pak")
pak::pak("tidymodels/recipes")

Contributing

排名相邻

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载