datatable.models.LinearModel.fit()¶
Train model on the input samples and targets using the parallel stochastic gradient descent method.
Parameters¶
Frame
Training frame.
Frame
Target frame having as many rows as X_train
and one column.
Frame
Validation frame having the same number of columns as X_train
.
Frame
Validation target frame of shape (nrows, 1)
.
float
Parameter that specifies how often, in epoch units, validation error should be checked.
float
The improvement of the relative validation error that should be
demonstrated by the model within nepochs_validation
epochs,
otherwise the training will stop.
int
Number of iterations that is used to average the validation error.
Each iteration corresponds to nepochs_validation
epochs.
LinearModelFitOutput
LinearModelFitOutput
is a Tuple[float, float]
with two fields: epoch
and loss
,
representing the final fitting epoch and the final loss, respectively.
If validation dataset is not provided, the returned epoch
equals to
nepochs
and the loss
is just float('nan')
.
See also¶
.predict()
– predict for the input samples..reset()
– reset the model.