fit: Fits model to data

View source: R/mlapi_S3.R

fitR Documentation

Fits model to data

Description

Generic function to fit models (inherited from mlapiEstimation)

Usage

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

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

## S3 method for class 'matrix'
fit(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, ...)

y

NULL by default. Optional response variable for supervised learning models. Should inherit from vector or Matrix or matrix. See documentation for corresponding models.

...

additional data/model dependent arguments to downstream functions.

Value

invisible(object$self())


mlapi documentation built on April 24, 2022, 5:05 p.m.