Learn R Programming

⚠️There's a newer version (1.2.1) of this package.Take me there.

recipes (version 0.2.0)

Preprocessing and Feature Engineering Steps for Modeling

Description

A recipe prepares your data for modeling. We provide an extensible framework for pipeable sequences of feature engineering steps provides preprocessing tools to be applied to data. Statistical parameters for the steps can be estimated from an initial data set and then applied to other data sets. The resulting processed output can then be used as inputs for statistical or machine learning models.

Copy Link

Version

Install

install.packages('recipes')

Monthly Downloads

215,376

Version

0.2.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Max Kuhn

Last Published

February 18th, 2022

Functions in recipes (0.2.0)

check_missing

Check for Missing Values
check_new_values

Check for New Values
check_cols

Check if all Columns are Present
bake

Apply a trained preprocessing recipe
add_step

Add a New Operation to the Current Recipe
check_name

check that newly created variable names don't overlap
check_class

Check Variable Class
detect_step

Detect if a particular step or check is used in a recipe
check_range

Check Range Consistency
check_type

Quantitatively check on variables
format_ch_vec

Helpers for printing step functions
fixed

Helper Functions for Profile Data Sets
recipe

Create a recipe for preprocessing data
discretize

Discretize Numeric Variables
rand_id

Make a random identification field for steps
has_role

Role Selection
juice

Extract transformed training set
recipes

recipes: A package for computing and preprocessing design matrices.
fully_trained

Check to see if a recipe is trained/prepared
yj_transform

Internal Functions
formula.recipe

Create a Formula from a Prepared Recipe
get_keep_original_cols

Get the keep_original_cols value of a recipe step
recipes_eval_select

Evaluate a selection with tidyselect semantics specific to recipes
recipes_pkg_check

Update packages
step_arrange

Sort rows using dplyr
step_YeoJohnson

Yeo-Johnson Transformation
step

step sets the class of the step and check is for checks.
step_BoxCox

Box-Cox Transformation for Non-Negative Data
step_center

Centering numeric data
reexports

Objects exported from other packages
required_pkgs.step_depth

S3 methods for tracking which additional packages are needed for steps.
roles

Manually Alter Roles
names0

Naming Tools
prep

Estimate a preprocessing recipe
selections

Methods for selecting variables in step functions
step_classdist

Distances to Class Centroids
step_dummy_multi_choice

Handle levels in multiple predictors together
step_dummy_extract

Extract patterns from nominal data
step_discretize

Discretize Numeric Variables
step_depth

Data Depths
prepper

Wrapper function for preparing recipes within resampling
print.recipe

Print a Recipe
step_bs

B-Spline Basis Functions
step_downsample

Down-Sample a Data Set Based on a Factor Variable
step_bin2factor

Create a Factors from A Dummy Variable
step_corr

High Correlation Filter
step_dummy

Create traditional dummy variables
step_factor2string

Convert Factors to Strings
step_cut

Cut a numeric variable into a factor
step_hyperbolic

Hyperbolic Transformations
step_filter

Filter rows using dplyr
step_geodist

Distance between two locations
step_lincomb

Linear Combination Filter
step_filter_missing

Missing Value Column Filter
step_isomap

Isomap Embedding
step_impute_mean

Impute numeric data using the mean
step_impute_median

Impute numeric data using the median
step_impute_roll

Impute numeric data using a rolling window statistic
step_impute_mode

Impute nominal data using the most common value
step_impute_knn

Impute via k-nearest neighbors
step_lag

Create a lagged predictor
step_naomit

Remove observations with missing values
step_harmonic

Add sin and cos terms for harmonic analysis
step_count

Create Counts of Patterns using Regular Expressions
step_impute_bag

Impute via bagged trees
step_date

Date Feature Generator
step_indicate_na

Create Missing Data Column Indicators
step_log

Logarithmic Transformation
step_integer

Convert values to predefined integers
step_logit

Logit Transformation
step_rm

General Variable Filter
step_ns

Natural Spline Basis Functions
step_novel

Simple Value Assignments for Novel Factor Levels
step_nnmf

Non-Negative Matrix Factorization Signal Extraction
step_ica

ICA Signal Extraction
step_sample

Sample rows using dplyr
summary.recipe

Summarize a recipe
step_kpca_poly

Polynomial Kernel PCA Signal Extraction
step_kpca_rbf

Radial Basis Function Kernel PCA Signal Extraction
step_relu

Apply (Smoothed) Rectified Linear Transformation
step_intercept

Add intercept (or constant) column
step_holiday

Holiday Feature Generator
step_interact

Create Interaction Variables
step_inverse

Inverse Transformation
terms_select

Select Terms in a Step Function.
tidy.step_BoxCox

Tidy the Result of a Recipe
step_pca

PCA Signal Extraction
step_kpca

Kernel PCA Signal Extraction
step_normalize

Center and scale numeric data
step_nnmf_sparse

Non-Negative Matrix Factorization Signal Extraction with lasso Penalization
update.step

Update a recipe step
step_impute_lower

Impute numeric data below the threshold of measurement
step_select

Select variables using dplyr
step_num2factor

Convert Numbers to Factors
step_nzv

Near-Zero Variance Filter
step_impute_linear

Impute numeric variables via a linear model
step_pls

Partial Least Squares Feature Extraction
step_unorder

Convert Ordered Factors to Unordered Factors
step_percentile

Percentile Transformation
step_poly

Orthogonal Polynomial Basis Functions
step_scale

Scaling Numeric Data
step_rename

Rename variables by name using dplyr
step_ratio

Ratio Variable Creation
step_regex

Detect a regular expression
step_rename_at

Rename multiple columns using dplyr
step_invlogit

Inverse Logit Transformation
step_unknown

Assign missing categories to "unknown"
step_spatialsign

Spatial Sign Preprocessing
step_sqrt

Square Root Transformation
step_upsample

Up-Sample a Data Set Based on a Factor Variable
step_ordinalscore

Convert Ordinal Factors to Numeric Scores
step_shuffle

Shuffle Variables
step_other

Collapse Some Categorical Levels
step_slice

Filter rows by position using dplyr
step_string2factor

Convert Strings to Factors
step_window

Moving Window Functions
step_range

Scaling Numeric Data to a Specific Range
step_mutate_at

Mutate multiple columns using dplyr
step_profile

Create a Profiling Version of a Data Set
step_mutate

Add new variables using dplyr
step_relevel

Relevel factors to a desired level
step_zv

Zero Variance Filter