Learn R Programming

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

recipes (version 1.0.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

173,696

Version

1.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

July 1st, 2022

Functions in recipes (1.0.0)

check_new_data

Check for required column at bake-time
check_cols

Check if all Columns are Present
check_new_values

Check for New Values
check_missing

Check for Missing Values
check_range

Check Range Consistency
check_class

Check Variable Class
check_type

Quantitatively check on variables
check_name

check that newly created variable names don't overlap
fixed

Helper Functions for Profile Data Sets
juice

Extract transformed training set
names0

Naming Tools
format_ch_vec

Helpers for printing step functions
reexports

Objects exported from other packages
recipes_pkg_check

Update packages
case-weight-helpers

Helpers for steps with case weights
case_weights

Using case weights with recipes
get_keep_original_cols

Get the keep_original_cols value of a recipe step
formula.recipe

Create a Formula from a Prepared Recipe
step_dummy

Create traditional dummy variables
step_discretize

Discretize Numeric Variables
step_harmonic

Add sin and cos terms for harmonic analysis
step_holiday

Holiday Feature Generator
add_step

Add a New Operation to the Current Recipe
recipe

Create a recipe for preprocessing data
bake

Apply a trained preprocessing recipe
step_impute_median

Impute numeric data using the median
yj_transform

Internal Functions
selections

Methods for selecting variables in step functions
detect_step

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

Discretize Numeric Variables
step_bs

B-Spline Basis Functions
step

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

Estimate a preprocessing recipe
prepper

Wrapper function for preparing recipes within resampling
step_BoxCox

Box-Cox Transformation for Non-Negative Data
fully_trained

Check to see if a recipe is trained/prepared
step_impute_knn

Impute via k-nearest neighbors
step_YeoJohnson

Yeo-Johnson Transformation
step_date

Date Feature Generator
step_depth

Data Depths
step_factor2string

Convert Factors to Strings
step_impute_bag

Impute via bagged trees
step_filter

Filter rows using dplyr
step_string2factor

Convert Strings to Factors
step_center

Centering numeric data
step_impute_mean

Impute numeric data using the mean
step_range

Scaling Numeric Data to a Specific Range
step_corr

High Correlation Filter
print.recipe

Print a Recipe
step_classdist

Distances to Class Centroids
rand_id

Make a random identification field for steps
step_impute_lower

Impute numeric data below the threshold of measurement
step_impute_linear

Impute numeric variables via a linear model
step_poly

Orthogonal Polynomial Basis Functions
step_pls

Partial Least Squares Feature Extraction
step_mutate

Add new variables using dplyr
step_dummy_extract

Extract patterns from nominal data
step_dummy_multi_choice

Handle levels in multiple predictors together
step_rename

Rename variables by name using dplyr
step_lag

Create a lagged predictor
step_lincomb

Linear Combination Filter
update.step

Update a recipe step
step_rename_at

Rename multiple columns using dplyr
step_invlogit

Inverse Logit Transformation
step_ratio

Ratio Variable Creation
step_inverse

Inverse Transformation
step_profile

Create a Profiling Version of a Data Set
step_spatialsign

Spatial Sign Preprocessing
tidy.step_BoxCox

Tidy the Result of a Recipe
step_sqrt

Square Root Transformation
summary.recipe

Summarize a recipe
step_nnmf_sparse

Non-Negative Matrix Factorization Signal Extraction with lasso Penalization
step_normalize

Center and scale numeric data
step_unorder

Convert Ordered Factors to Unordered Factors
step_mutate_at

Mutate multiple columns using dplyr
step_regex

Detect a regular expression
step_unknown

Assign missing categories to "unknown"
terms_select

Select Terms in a Step Function.
step_time

Time Feature Generator
step_arrange

Sort rows using dplyr
recipes

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

Isomap Embedding
recipes_eval_select

Evaluate a selection with tidyselect semantics specific to recipes
step_nzv

Near-Zero Variance Filter
step_kpca

Kernel PCA Signal Extraction
has_role

Role Selection
step_hyperbolic

Hyperbolic Transformations
step_naomit

Remove observations with missing values
step_nnmf

Non-Negative Matrix Factorization Signal Extraction
required_pkgs.step_depth

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

Manually Alter Roles
step_zv

Zero Variance Filter
step_percentile

Percentile Transformation
step_pca

PCA Signal Extraction
step_bin2factor

Create a Factors from A Dummy Variable
step_count

Create Counts of Patterns using Regular Expressions
step_geodist

Distance between two locations
step_filter_missing

Missing Value Column Filter
step_sample

Sample rows using dplyr
step_other

Collapse Some Categorical Levels
step_relu

Apply (Smoothed) Rectified Linear Transformation
step_logit

Logit Transformation
step_indicate_na

Create Missing Data Column Indicators
step_cut

Cut a numeric variable into a factor
step_ica

ICA Signal Extraction
step_integer

Convert values to predefined integers
step_num2factor

Convert Numbers to Factors
step_impute_roll

Impute numeric data using a rolling window statistic
step_impute_mode

Impute nominal data using the most common value
step_relevel

Relevel factors to a desired level
step_intercept

Add intercept (or constant) column
step_interact

Create Interaction Variables
step_slice

Filter rows by position using dplyr
step_ordinalscore

Convert Ordinal Factors to Numeric Scores
step_log

Logarithmic Transformation
step_novel

Simple Value Assignments for Novel Factor Levels
step_kpca_poly

Polynomial Kernel PCA Signal Extraction
step_kpca_rbf

Radial Basis Function Kernel PCA Signal Extraction
step_scale

Scaling Numeric Data
step_rm

General Variable Filter
step_window

Moving Window Functions
step_shuffle

Shuffle Variables
update_role_requirements

Update role specific requirements
step_select

Select variables using dplyr
step_ns

Natural Spline Basis Functions