Scikit-Multiflow: A Multi-output Streaming Framework

Jacob Montiel, Jesse Read, Albert Bifet, Talel Abdessalem

Introduction

Traditional machine learning frameworks typically operate under the assumption of batch learning, where models are trained on static, finite datasets. However, real-world data—ranging from sensor readings to financial transactions—often arrives as a continuous, infinite stream. While Java-based tools like MOA (Massive Online Analysis) and MEKA have long served this niche, the lack of a comprehensive Python-based equivalent created a significant barrier for the broader data science community. scikit-multiflow addresses this gap, providing an open-source Python framework specifically designed for multi-output and stream data mining.

Framework Architecture and Methods

scikit-multiflow is designed with modularity and extensibility in mind, adhering to the familiar design philosophy of scikit-learn. The core of the framework is the StreamModel class, which replaces the standard batch fit method with partial_fit. This allows models to update incrementally as new data points arrive, rather than retraining from scratch.

A critical component of the framework is its support for Prequential Evaluation (interleaved-test-then-train). In this setup, each incoming sample is first used to test the current model's performance before being incorporated into the training set. This provides a continuous, real-time measure of model accuracy and adaptation.

Prequential evaluation process in scikit-multiflow.

The library includes a diverse set of state-of-the-art streaming algorithms, including Hoeffding Trees, ensemble methods like Adaptive Random Forests, and drift detection mechanisms such as ADWIN and DDM that monitor for changes in underlying data distributions.

Stream Generation and Datasets

Because stream mining often deals with infinite data, the framework prioritizes Stream Generators over static datasets. These generators allow for the creation of synthetic data streams with controlled properties, such as concept drift or specific noise levels. Built-in generators include Random-RBF for cluster-based data, and specialized generators for multi-label and regression tasks, ensuring that multi-output capabilities are treated as first-class citizens within the ecosystem.

Key Results and Comparison

scikit-multiflow successfully bridges the gap between the Python ecosystem and established Java tools. It achieves feature parity with many core functionalities of MOA and MEKA while maintaining interoperability with scikit-learn. This allows researchers to use scikit-learn batch models as base learners within scikit-multiflow wrappers.

Comparison of algorithm support across different frameworks.

As shown in the comparison table, the framework supports a wide array of tasks including classification, regression, and multi-output learning. By following PEP8 standards and implementing continuous integration, the authors have provided a reliable, high-quality tool for the research community that integrates seamlessly with NumPy, SciPy, and Jupyter Notebooks.

Conclusion and Future Directions

The primary contribution of scikit-multiflow is the democratization of stream learning research by making it accessible within the Python ecosystem. While Python may face performance trade-offs compared to Java in high-throughput production environments, the framework's ease of use makes it an invaluable tool for development and experimentation. Future work will likely focus on expanding algorithm coverage and improving integration with streaming deep learning frameworks.

Summary updated

BibTeX
@article{montiel2018scikit,
  author = {Jacob Montiel and Jesse Read and Albert Bifet and Talel Abdessalem},
  title = {{Scikit-Multiflow: A Multi-output Streaming Framework}},
  journal = {J. Mach. Learn. Res.},
  year = {2018},
  url = {https://openreview.net/forum?id=tVAj1nvGmNm},
}
Figure