Basic Functions

bake()

Apply a Trained Data Recipe

formula(<recipe>)

Create a Formula from a Prepared Recipe

prep()

Train a Data Recipe

print(<recipe>)

Print a Recipe

recipe()

Create a Recipe for Preprocessing Data

recipes

recipes: A package for computing and preprocessing design matrices.

summary(<recipe>)

Summarize a Recipe

tidy(<recipe>) tidy(<step>) tidy(<check>)

Tidy the Result of a Recipe

juice()

Extract Finalized Training Set

selections

Methods for Select Variables in Step Functions

has_role() all_predictors() all_outcomes() has_type() all_numeric() all_nominal() current_info()

Role Selection

add_role() update_role()

Manually Alter Roles

prepper()

Wrapper function for preparing recipes within resampling

Step Functions - Imputation

step_bagimpute() imp_vars() tidy(<step_bagimpute>)

Imputation via Bagged Trees

step_knnimpute() tidy(<step_knnimpute>)

Imputation via K-Nearest Neighbors

step_lowerimpute() tidy(<step_lowerimpute>)

Impute Numeric Data Below the Threshold of Measurement

step_meanimpute() tidy(<step_meanimpute>)

Impute Numeric Data Using the Mean

step_medianimpute() tidy(<step_medianimpute>)

Impute Numeric Data Using the Median

step_modeimpute() tidy(<step_modeimpute>)

Impute Nominal Data Using the Most Common Value

step_rollimpute() tidy(<step_rollimpute>)

Impute Numeric Data Using a Rolling Window Statistic

Step Functions - Individual Transformations

step_BoxCox() tidy(<step_BoxCox>)

Box-Cox Transformation for Non-Negative Data

step_bs() tidy(<step_bs>)

B-Spline Basis Functions

step_hyperbolic() tidy(<step_hyperbolic>)

Hyperbolic Transformations

step_inverse() tidy(<step_inverse>)

Inverse Transformation

step_invlogit() tidy(<step_invlogit>)

Inverse Logit Transformation

step_log() tidy(<step_log>)

Logarithmic Transformation

step_logit() tidy(<step_logit>)

Logit Transformation

step_mutate() tidy(<step_mutate>)

Add new variables using mutate

step_ns() tidy(<step_ns>)

Nature Spline Basis Functions

step_poly() tidy(<step_poly>)

Orthogonal Polynomial Basis Functions

step_relu() tidy(<step_relu>)

Apply (Smoothed) Rectified Linear Transformation

step_sqrt() tidy(<step_sqrt>)

Square Root Transformation

step_YeoJohnson() tidy(<step_YeoJohnson>)

Yeo-Johnson Transformation

Step Functions - Discretization

discretize() predict(<discretize>)

Discretize Numeric Variables

step_discretize() tidy(<step_discretize>)

Discretize Numeric Variables

Step Functions - Dummy Variables and Encodings

step_bin2factor() tidy(<step_bin2factor>)

Create a Factors from A Dummy Variable

step_count() tidy(<step_count>)

Create Counts of Patterns using Regular Expressions

step_date() tidy(<step_date>)

Date Feature Generator

step_dummy() tidy(<step_dummy>)

Dummy Variables Creation

step_factor2string() tidy(<step_factor2string>)

Convert Factors to Strings

step_holiday() tidy(<step_holiday>)

Holiday Feature Generator

step_integer() tidy(<step_integer>)

Convert values to predefined integers

step_novel() tidy(<step_novel>)

Simple Value Assignments for Novel Factor Levels

step_num2factor() tidy(<step_num2factor>)

Convert Numbers to Factors

step_ordinalscore() tidy(<step_ordinalscore>)

Convert Ordinal Factors to Numeric Scores

step_other() tidy(<step_other>)

Collapse Some Categorical Levels

step_regex() tidy(<step_regex>)

Create Dummy Variables using Regular Expressions

step_string2factor() tidy(<step_string2factor>)

Convert Strings to Factors

step_unorder() tidy(<step_unorder>)

Convert Ordered Factors to Unordered Factors

Step Functions - Interactions

step_interact() tidy(<step_interact>)

Create Interaction Variables

Step Functions - Normalization

step_center() tidy(<step_center>)

Centering Numeric Data

step_range() tidy(<step_range>)

Scaling Numeric Data to a Specific Range

step_scale() tidy(<step_scale>)

Scaling Numeric Data

Step Functions - Multivariate Transformations

step_classdist() tidy(<step_classdist>)

Distances to Class Centroids

step_depth() tidy(<step_depth>)

Data Depths

step_geodist() tidy(<step_geodist>)

Distance between two locations

step_ica() tidy(<step_ica>)

ICA Signal Extraction

step_isomap() tidy(<step_isomap>)

Isomap Embedding

step_kpca() tidy(<step_kpca>)

Kernel PCA Signal Extraction

step_nnmf() tidy(<step_nnmf>)

NNMF Signal Extraction

step_pca() tidy(<step_pca>)

PCA Signal Extraction

step_pls() tidy(<step_pls>)

Partial Least Squares Feature Extraction

step_ratio() denom_vars() tidy(<step_ratio>)

Ratio Variable Creation

step_spatialsign() tidy(<step_spatialsign>)

Spatial Sign Preprocessing

Step Functions - Filters

step_corr() tidy(<step_corr>)

High Correlation Filter

step_lincomb() tidy(<step_lincomb>)

Linear Combination Filter

step_nzv() tidy(<step_nzv>)

Near-Zero Variance Filter

step_rm() tidy(<step_rm>)

General Variable Filter

step_zv() tidy(<step_zv>)

Zero Variance Filter

Step Functions - Row Operations

step_arrange() tidy(<step_arrange>)

Sort rows using dplyr

step_downsample() tidy(<step_downsample>)

Down-Sample a Data Set Based on a Factor Variable

step_filter() tidy(<step_filter>)

Filter rows using dplyr

step_lag()

Create a lagged predictor

step_naomit() tidy(<step_naomit>)

Remove observations with missing values

step_rollimpute() tidy(<step_rollimpute>)

Impute Numeric Data Using a Rolling Window Statistic

step_sample() tidy(<step_sample>)

Sample rows using dplyr

step_shuffle() tidy(<step_shuffle>)

Shuffle Variables

step_slice() tidy(<step_slice>)

Filter rows by position using dplyr

step_upsample() tidy(<step_upsample>)

Up-Sample a Data Set Based on a Factor Variable

Step Functions - Others

step_intercept()

Add intercept (or constant) column

step_profile() tidy(<step_profile>)

Create a Profiling Version of a Data Set

step_window() tidy(<step_window>)

Moving Window Functions

Check Functions

check_cols() tidy(<check_cols>)

Check if all Columns are Present

check_missing() tidy(<check_missing>)

Check for Missing Values

check_range() tidy(<check_range>)

Check Range Consistency

Example Datasets

biomass

Biomass Data

covers

Raw Cover Type Data

credit_data

Credit Data

okc

OkCupid Data