Main Content

Train incremental learning model

The `fit`

function fits a configured incremental learning model for linear regression (`incrementalRegressionLinear`

object) or linear binary classification (`incrementalClassificationLinear`

object) to streaming data. To additionally track performance metrics using the data as it arrives, use `updateMetricsAndFit`

instead.

To fit or cross-validate a regression or classification model to an entire batch of data at once, see the other machine learning models in Regression or Classification.

returns an incremental learning model `Mdl`

= fit(`Mdl`

,`X`

,`Y`

)`Mdl`

, which represents the input incremental learning model `Mdl`

trained using the predictor and response data, `X`

and `Y`

respectively. Specifically, `fit`

implements the following procedure:

Initialize the solver with the configurations and linear model coefficient and bias estimates of the input incremental learning model

`Mdl`

.Fit the model to the data, and store the updated coefficient estimates and configurations in the output model

`Mdl`

.

The input and output models are the same data type.

Unlike traditional training, a separate test (hold out) set might not exist for incremental learning. Therefore, to treat each incoming chunk of data as a test set, pass the incremental model and each incoming chunk to

`updateMetrics`

before training the model on the same data.