Main Content

Incremental Learning

Fit classification model to streaming data and track its performance

Incremental learning, or online learning, involves processing incoming data from a data stream, possibly given little to no knowledge of the distribution of the predictor variables, aspects of the objective function, and whether the observations are labeled. Incremental learning problems contrast with traditional machine learning methods, in which enough labeled data is available to fit to a model, perform cross-validation to tune hyperparameters, and infer the predictor distribution characteristics.

Incremental learning requires a configured incremental model. You can create and configure an incremental model directly by calling an object, for example incrementalClassificationLinear, or you can convert a supported traditionally trained model to an incremental learner by using incrementalLearner. After configuring a model and setting up a data stream, you can fit the incremental model to the incoming chunks of data, track the predictive performance of the model, or perform both actions simultaneously.

For more details, see Incremental Learning Overview.

Functions

expand all

Linear Binary Classification Model

incrementalLearnerConvert binary classification support vector machine (SVM) model to incremental learner
incrementalLearnerConvert linear model for binary classification to incremental learner

Naive Bayes Model

incrementalLearnerConvert naive Bayes classification model to incremental learner

Linear Binary Classification Model

fitTrain linear model for incremental learning
updateMetricsUpdate performance metrics in linear model for incremental learning given new data
updateMetricsAndFitUpdate performance metrics in linear model for incremental learning given new data and train model

Naive Bayes Model

fitTrain naive Bayes classification model for incremental learning
updateMetricsUpdate performance metrics in naive Bayes classification model for incremental learning given new data
updateMetricsAndFitUpdate performance metrics in naive Bayes classification model for incremental learning given new data and train model

Linear Binary Classification Model

predictPredict responses for new observations from linear model for incremental learning
lossLoss of linear model for incremental learning on batch of data

Naive Bayes Model

predictPredict responses for new observations from naive Bayes classification model for incremental learning
lossLoss of naive Bayes classification model for incremental learning on batch of data
logpLog unconditional probability density of naive Bayes classification model for incremental learning

Objects

incrementalClassificationLinearBinary classification linear model for incremental learning
incrementalClassificationNaiveBayesNaive Bayes classification model for incremental learning

Topics

Incremental Learning Overview

Discover fundamental concepts about incremental learning, including incremental learning objects, functions, and workflows.

Configure Incremental Learning Model

Prepare an incremental learning model for incremental performance evaluation and training on a data stream.

Implement Incremental Learning for Classification Using Succinct Workflow

Use the succinct workflow to implement incremental learning for binary classification with prequential evaluation.

Implement Incremental Learning for Classification Using Flexible Workflow

Use the flexible workflow to implement incremental learning for binary classification with prequential evaluation.

Initialize Incremental Learning Model from Logistic Regression Model Trained in Classification Learner

Train a logistic regression model using the Classification Learner app, and then initialize an incremental model for binary classification using the estimated coefficients.

Perform Conditional Training During Incremental Learning

Use the flexible workflow to implement conditional training during incremental learning with a naive Bayes multiclass classification model.

Perform Text Classification Incrementally

This example shows how to incrementally train a model to classify documents based on word frequencies in the documents; a bag-of-words model.

Incremental Learning with Naive Bayes and Heterogeneous Data

This example shows how to prepare heterogeneous predictor data, containing real-valued and categorical measurements, for incremental learning using a naive Bayes classifier.