This is generic function to fit transformers (class = "transformer") and then apply fitted model to input.
fit_transform(x, model, y = NULL, ...)# S3 method for Matrix
fit_transform(x, model, y = NULL, ...)
# S3 method for matrix
fit_transform(x, model, y = NULL, ...)
a matrix like object, should inherit from Matrix
or matrix
instance of class estimator
which should implement method
with signature $fit(x, ...)
NULL
by default. Optional response variable for supervised models.
Should inherit from vector
Matrix
or matrix
. See documentation
for corresponding models.
additional data/model dependent arguments to downstream functions.
Transformed version of x