datatable.models.LinearModel.fit()

Train model on the input samples and targets using the parallel stochastic gradient descent method.

Parameters

X_train
Frame

Training frame.

y_train
Frame

Target frame having as many rows as X_train and one column.

X_validation
Frame

Validation frame having the same number of columns as X_train.

y_validation
Frame

Validation target frame of shape (nrows, 1).

nepochs_validation
float

Parameter that specifies how often, in epoch units, validation error should be checked.

validation_error
float

The improvement of the relative validation error that should be demonstrated by the model within nepochs_validation epochs, otherwise the training will stop.

validation_average_niterations
int

Number of iterations that is used to average the validation error. Each iteration corresponds to nepochs_validation epochs.

return
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