Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fit_transform

Fit model to the data, then transforms data


Description

Generic function to fit transformers (inherits from mlapiTransformation)

Usage

fit_transform(x, model, y = NULL, ...)

## S3 method for class 'Matrix'
fit_transform(x, model, y = NULL, ...)

## S3 method for class 'matrix'
fit_transform(x, model, y = NULL, ...)

Arguments

x

A matrix like object, should inherit from Matrix or matrix

model

instance of class estimator which should implement method with signature $fit(x, ...)

y

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.

Value

Transformed version of the x


mlapi

Abstract Classes for Building 'scikit-learn' Like API

v0.1.0
MIT + file LICENSE
Authors
Dmitriy Selivanov
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.