
Integration Functions: Combining Supervised and Unsupervised Learning
Source:R/integration.R
tl_reduce_dimensions.RdThese functions demonstrate the power of tidylearn's unified approach by seamlessly integrating supervised and unsupervised learning techniques. Feature Engineering via Dimensionality Reduction
Value
A list with components:
- data
The transformed data frame with reduced-dimension columns and the response variable (if provided).
- reduction_model
The fitted tidylearn dimensionality reduction model.
- original_data
The original input data frame.
- response
The response variable name, or
NULL.
Details
Use PCA, MDS, or other dimensionality reduction as a preprocessing step for supervised learning. This can improve model performance and interpretability.
Examples
# \donttest{
# Reduce dimensions before classification
reduced <- tl_reduce_dimensions(
iris, response = "Species",
method = "pca", n_components = 3
)
model <- tl_model(reduced$data, Species ~ ., method = "tree")
# }