Fit a model to estimate its parameters from a data set.
Usage
fit(x, ...)
# S3 method for formula
fit(x, data, model, ...)
# S3 method for matrix
fit(x, y, model, ...)
# S3 method for ModelFrame
fit(x, model, ...)
# S3 method for recipe
fit(x, model, ...)
# S3 method for MLModel
fit(x, ...)
# S3 method for MLModelFunction
fit(x, ...)
Arguments
x
input specifying a relationship between model
predictor and response variables. Alternatively, a model
function or call may be given first followed by the input specification.
...
arguments passed to other methods.
data
data frame containing observed predictors and
outcomes.
model
model function, function name, or call; ignored
and can be omitted when fitting modeled inputs.
y
response variable.
Value
MLModelFit class object.
Details
User-specified case weights may be specified for ModelFrames upon
creation with the weights argument in its
constructor.
Variables in recipe specifications may be designated as case weights
with the role_case function.