tof_create_recipe: Create a recipe for preprocessing sample-level cytometry data...

View source: R/modeling_helpers.R

tof_create_recipeR Documentation

Create a recipe for preprocessing sample-level cytometry data for an elastic net model

Description

Create a recipe for preprocessing sample-level cytometry data for an elastic net model

Usage

tof_create_recipe(
  feature_tibble,
  predictor_cols,
  outcome_cols,
  standardize_predictors = TRUE,
  remove_zv_predictors = FALSE,
  impute_missing_predictors = FALSE
)

Arguments

feature_tibble

A tibble in which each row represents a sample- or patient- level observation, such as those produced by tof_extract_features.

predictor_cols

Unquoted column names indicating which columns in the data contained in 'feature_tibble' should be used as predictors in the elastic net model. Supports tidyselect helpers.

outcome_cols

Unquoted column names indicating which columns in 'feature_tibble' should be used as outcome variables in the elastic net model. Supports tidyselect helpers.

standardize_predictors

A logical value indicating if numeric predictor columns should be standardized (centered and scaled) before model fitting. Defaults to TRUE.

remove_zv_predictors

A logical value indicating if predictor columns with near-zero variance should be removed before model fitting using step_nzv. Defaults to FALSE.

impute_missing_predictors

A logical value indicating if predictor columns should have missing values imputed using k-nearest neighbors before model fitting (see step_impute_knn). Imputation is performed using an observation's 5 nearest-neighbors. Defaults to FALSE.

Value

A recipe object.


keyes-timothy/tidytof documentation built on Aug. 28, 2024, 8:37 a.m.