View source: R/preprocessing.R
| tl_prepare_data | R Documentation |
Unified preprocessing functions that work with both supervised and unsupervised workflows Prepare Data for Machine Learning
tl_prepare_data(
data,
formula = NULL,
impute_method = "mean",
scale_method = "standardize",
encode_categorical = TRUE,
remove_zero_variance = TRUE,
remove_correlated = FALSE,
correlation_cutoff = 0.95
)
data |
A data frame |
formula |
Optional formula (for supervised learning) |
impute_method |
Method for missing value imputation: "mean", "median", "mode", "knn" |
scale_method |
Scaling method: "standardize", "normalize", "robust", "none" |
encode_categorical |
Whether to encode categorical variables (default: TRUE) |
remove_zero_variance |
Remove zero-variance features (default: TRUE) |
remove_correlated |
Remove highly correlated features (default: FALSE) |
correlation_cutoff |
Correlation threshold for removal (default: 0.95) |
Comprehensive preprocessing pipeline including imputation, scaling, encoding, and feature engineering
A list containing processed data and preprocessing metadata
processed <- tl_prepare_data(iris, Species ~ ., scale_method = "standardize")
model <- tl_model(processed$data, Species ~ ., method = "logistic")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.