Convenience function that fits a preprocessing pipeline to data and
immediately applies the transformation. This is equivalent to calling
fit() followed by transform() but is more efficient and convenient.
Usage
fit_transform(object, X, ...)
Value
A list with two elements: preproc (the fitted preprocessor) and transformed (the transformed data)
Arguments
object
A preprocessing object (e.g., prepper or pre_processor)
# Fit and transform in one stepX <- matrix(rnorm(100), 10, 10)
preproc <- center()
result <- fit_transform(preproc, X)
fitted_preproc <- result$preproc
X_transformed <- result$transformed