Fits model to data

Share:

Description

Generic function to fit models - inherited from estimator

Usage

1
2
3
4
5
6
7
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 models. Should inherit from vector Matrix or matrix. See documentation for corresponding models.

...

additional data/model dependent arguments to downstream functions.

Value

invisible(object$self())

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.