An ensemble-based online learning algorithm for streaming data

Tien Thanh Nguyen, Thi Thu Thuy Nguyen, Xuan Cuong Pham, Alan Wee-Chung Liew, James C. BezdekarXiv 2017

Abstract

In modern data environments, such as network traffic monitoring and financial market analysis, data arrives in continuous, high-dimensional streams that render traditional "offline" machine learning impractical. This paper introduces Random Projection Naïve Bayes (RPNB), a novel ensemble-based online learning algorithm designed to handle these challenges. By leveraging Random Projections to create diverse data representations and employing an ensemble of fast Naïve Bayes classifiers, the proposed method achieves high classification accuracy with a significantly reduced update frequency. Empirical evaluations across 33 datasets demonstrate that RPNB outperforms state-of-the-art online learning algorithms while maintaining computational efficiency through mistake-driven parameter updates.

Introduction

Traditional machine learning paradigms assume that the entire training dataset is available simultaneously. However, the rise of real-time data streams necessitates online learning approaches that update models sequentially as new observations arrive. Existing online learning algorithms, such as Online Gradient Descent (OGD), Passive Aggressive (PA) learning, and Online Bagging, often struggle with three primary issues: high computational costs due to updating after every data point, the "curse of dimensionality" in feature-rich environments, and a lack of flexibility regarding mini-batch processing.

To address these limitations, this research proposes the RPNB algorithm. RPNB combines the dimensionality reduction capabilities of Random Projections with the efficiency of Naïve Bayes classifiers to create a robust, scalable ensemble model for streaming data.

Methodology

1. Random Projections for Diversity

RPNB utilizes Random Projections (RP) to transform high-dimensional input data into multiple lower-dimensional subspaces. By using random matrices (e.g., Gaussian or Bernoulli distributions), the algorithm generates diverse "views" of the same data point. While Random Projections are often used for dimensionality reduction, RPNB specifically exploits their inherent "instability" to ensure that the base classifiers in the ensemble receive sufficiently different data representations, which is critical for ensemble performance.

2. Naïve Bayes Ensemble

The core of the model is an ensemble of Naïve Bayes (NB) classifiers, each trained on a different projected subspace. Naïve Bayes was selected for its simplicity and speed, making it ideal for high-velocity streams. The final classification decision is reached by aggregating the outputs of these base classifiers using a standard "Sum rule."

3. Mistake-Driven Updates

Unlike many online learners that update parameters with every new observation, RPNB employs a mistake-driven update strategy. The model only updates the mean and variance of its Naïve Bayes likelihood distributions when it fails to correctly classify a data point. This approach significantly reduces the computational overhead. Furthermore, the algorithm supports both 1-by-1 learning and mini-batch processing, allowing it to adapt to different streaming speeds and hardware constraints. Once a data chunk is processed for an update, it is discarded to maintain a low memory footprint.

Experimental Evaluation

Datasets

The algorithm was rigorously tested on 33 datasets:

  • 32 UCI Repository Datasets: A mix of low-dimensional (e.g., Iris) and high-dimensional (e.g., Isolet, Multiple Features) labeled datasets.
  • Synthetic Gaussian Mixture (GM) Dataset: A 1,000-observation dataset with three components designed to evaluate the algorithm’s behavior under known statistical distributions.

Benchmarks

RPNB (specifically the 1-by-1 learning variant) was compared against several top-tier online learning benchmarks, including PA, Soft Confidence-Weighted (SCW) learning, OGD, Adaptive Regularization of Weight Vectors (AROW), and Online Bagging.

Key Results and Insights

Superior Accuracy

Statistical analysis via Wilcoxon signed-rank tests confirmed that RPNB(1b1) significantly outperformed benchmark algorithms in both classification error rates and F1 scores. Notably, RPNB outperformed AROW on 24 of the 33 datasets and Online Bagging on 22 datasets, establishing it as a highly competitive alternative for streaming classification tasks.

Update Efficiency

One of the most striking results was the reduction in model updates. On the synthetic GM dataset, RPNB required an average of only 29.6 updates. In comparison, OGD required 247.4 updates—nearly nine times as many. This stability suggests that RPNB is particularly well-suited for environments where computational resources are constrained or where the cost of model modification is high.

Theoretical Considerations

The authors noted that while Random Projections are inspired by the Johnson-Lindenstrauss (JL) lemma, the algorithm remains effective even when the JL lemma's geometric distance preservation guarantees do not strictly hold (such as in very low-dimensional spaces). In these instances, the primary value of the projection shifts from dimensionality reduction to the generation of ensemble diversity.

Conclusion

RPNB offers a powerful solution for online learning by combining the speed of Naïve Bayes with the diversity-generating power of Random Projections. By focusing on mistake-driven updates, the algorithm achieves a balance between high accuracy and low computational cost. Future work will focus on the practical deployment of the mini-batch mode in real-world high-speed data streams to further optimize performance and reduce overhead in industrial applications.

Summary updated

BibTeX
@misc{nguyen2017ensemble,
  author = {Tien Thanh Nguyen and Thi Thu Thuy Nguyen and Xuan Cuong Pham and Alan Wee-Chung Liew and James C. Bezdek},
  title = {{An ensemble-based online learning algorithm for streaming data}},
  year = {2017},
  eprint = {1704.07938},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.07938},
}
Figure