- ๐ Table of Contents
- ๐ Overview
- ๐ง OAL Strategies
- โ๏ธ OAL Classifiers
- ๐ OSSL Classifiers
- ๐ Supervised Classifiers
- ๐ฎ OAL Regression
- ๐จ Drift Detection
- ๐งฉ Summary of Features
- ๐ Usage Guide
- ๐ References
- ๐ Note
- โจ Contributor Declaration
- ๐ Views
Welcome to Awesome-OL, your comprehensive toolkit for online learning strategies and classifiers. This repository includes state-of-the-art implementations for Online Active Learning (OAL) and Online Semi-Supervised Learning (OSSL), complete with classifiers, datasets, and visualizations.
For usage instructions, please see the Usage Guide.
Explore a variety of online active learning strategies in the OAL_strategies/ folder.
| ๐งฉ Strategy | ๐ Description | ๐ Reference | ๐พ Code | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| CogDQS | Dual-query strategy using human memory cognition | IEEE | โ | 2023 | TNNLS |
| DSA-AI | Dynamic submodular learning for imbalanced drifting streams | IEEE | GitHub | 2024 | TNNLS |
| MTSGQS | Memory-triggered submodularity-guided strategy | IEEE | โ | 2023 | TITS |
| DMI-DD | Explanation-based query strategy at chunk level | IEEE | GitHub | 2024 | TCYB |
Baseline Strategies
| ๐งฉ Strategy | ๐ Description | ๐ Reference | ๐พ Code | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| RS | Random Sampling | โ | โ | โ | โ |
| US_fix | Uncertainty sampling with fixed threshold | IEEE | โ | 2014 | TNNLS |
| US_var | Uncertainty sampling with variable threshold | IEEE | โ | 2014 | TNNLS |
| ๐ค Classifier | ๐ Description | ๐ Reference | ๐พ Source | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| ROALE-DI | Reinforcement-based ensemble for drifting imbalanced data | IEEE | GitHub | 2022 | TKDE |
| OALE | Online ensemble with hybrid labeling | IEEE | โ | 2019 | TNNLS |
| ๐ค Classifier | ๐ Description | ๐ Reference | ๐พ Source | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| OSSBLS | Semi-supervised BLS with static anchors | IEEE | โ | 2021 | TII |
| ISSBLS | Semi-supervised BLS without historical dependency | IEEE | โ | 2021 | TII |
Baseline Strategy
| ๐ค Classifier | ๐ Description | ๐ Reference | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|
| SOSELM | Semi-supervised ELM | ScienceDirect Paper | 2016 | Neurocomputing |
| ๐ค Classifier | ๐ Description | ๐ Reference | ๐พ Source | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| OLI2DS | Imbalanced data stream learner with dynamic costs | IEEE | GitHub | 2023 | TKDE |
| IWDA | Learner-agnostic drift adaptation using density estimation | IEEE | GitHub | 2023 | TNNLS |
| DES | Drift-adaptive ensemble with SMOTE | IEEE | GitHub | 2024 | TNNLS |
| ACDWM | Adaptive chunk selection for stability and drift | IEEE | GitHub | 2020 | TNNLS |
| ARF | Adaptive resampling ensemble with ADWIN | Springer | GitHub | 2017 | Machine Learning |
| SRP | Random subspace + online bagging | IEEE | GitHub | 2019 | ICDM |
| BLS-W | Online BLS with ShermanโMorrisonโWoodbury update | IEEE | GitHub | 2023 | TCYB |
| QRBLS | BLS with QR factorization | IEEE | GitHub | 2025 | TNNLS |
Baseline Classifier
| ๐ค Classifier | ๐ Description | ๐ Reference | ๐พ Source | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| OSELM | Sequential ELM without drift detection | IEEE | GitHub | 2006 | TNNLS |
| ๐ค Regressor | ๐ Description | ๐ Reference | ๐พ Source | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| KNN | k-Nearest Neighbors for online regression with sliding window | โ | โ | โ | โ |
| Lasso | Online Lasso regression with โ1 regularization | โ | โ | โ | โ |
| Ridge | Online Ridge regression with โ2 regularization | โ | โ | โ | โ |
| Linear | Ordinary Least Squares with incremental updates | โ | โ | โ | โ |
| HoeffdingTree | Adaptive decision tree for regression with drift detection | IEEE | GitHub | 2007 | ICIAfS |
| ARF | Adaptive Random Forest regressor | โ | GitHub | โ | โ |
| ๐ค Detector | ๐ Description | ๐ Reference | ๐พ Source | ๐ Year | ๐๏ธ Journal/Conference |
|---|---|---|---|---|---|
| DDM | Drift Detection Method based on error rate monitoring | โ | Github | โ | โ |
| EDDM | Enhanced DDM for gradual drift detection | โ | Github | โ | โ |
| KSWIN | Kolmogorov-Smirnov Windowing method for concept drif | โ | Github | โ | โ |
| PageHinkley | Sequential change detection with cumulative sum | โ | Github | โ | โ |
| ๐น Method | ๐ง OAL Strategy | ๐ค Classifier | โช Binary | ๐ข Multi-class | ๐ Drift Adaptation | ๐งฉ Ensemble |
|---|---|---|---|---|---|---|
| ROALE-DI | โ | โ | โ | โ | โ | โ |
| CogDQS | โ | โ | โ | โ | โ | โ |
| DSA-AI | โ | โ | โ | โ | โ | โ |
| DMI-DD | โ | โ | โ | โ | โ | โ |
| MTSGQS | โ | โ | โ | โ | โ | โ |
| RS | โ | โ | โ | โ | โ | โ |
| US-fix | โ | โ | โ | โ | โ | โ |
| US-var | โ | โ | โ | โ | โ | โ |
| OLI2DS | โ | โ | โ | โ | โ | โ |
| IWDA | โ | โ | โ | โ | โ | โ |
| DES | โ | โ | โ | โ | โ | โ |
| ACDWM | โ | โ | โ | โ | โ | โ |
| SRP | โ | โ | โ | โ | โ | โ |
| ARF | โ | โ | โ | โ | โ | โ |
| QRBLS | โ | โ | โ | โ | โ | โ |
๐ This section will guide users on how to use this project. It will introduce the operation steps including environment preparation, data loading, model selection and visualization results.
๐ก Follow these steps to complete the environment setup (using VSCode as an example):
-
Open Anaconda Prompt or Terminal
-
Navigate to the directory containing the
env.ymlfile -
Create the Conda environment by running:
conda env create -f env.yml
-
Activate the Conda environment
Open the integrated terminal in VSCode (Terminal>New Terminal) and execute:conda activate OL
-
Select Python Interpreter in VSCode
- Press
Ctrl + Shift + P(Windows/Linux) orCmd + Shift + P(Mac) to open the Command Palette - Type and select Python: Select Interpreter
- Choose the interpreter corresponding to the activated Conda environment (
OL)
- Press
-
Run your Python code
Open your Python files and run them as usual. The activated environment will provide all required packages and dependencies.
- In the project root directory, locate the file
classify.ipynb,regression.ipynb,drift_detection. Within these notebooks, you can select the framework, dataset, classifier, strategies, drift detector, and hyperparameters you wish to use. - Optionally, you can output visualization results for an intuitive comparison of model performance. These results will also be saved automatically in the
Resultsfolder. - For detailed guidance, please follow the step-by-step instructions provided within the notebook.
Datasets are stored as .csv files in the datasets folder. Each file contains:
๐น Attributes (features)
๐น Labels
You can select any .csv file as your test dataset.
Visualization tools are provided in the visualization folder, including:
- Multi-model confusion matrix
- Dynamic GIFs displaying Accuracy curves and Macro F1 scores
The following example results can be viewed directly in the main.ipynb:
You can find detailed log information for each demo run in the Logs folder located at the project root. Example log snippet:
16:08 --------------------------------------------------------------------------------------------------
16:08 Max samples: 1000
16:08 n_round: 3
16:08 n_pt: 100
16:08 dataset_name: Waveform
16:08 chunk_size: 1
16:08 framework: OL
16:08 stream: None
16:08 clf_name_list: ['BLS', 'NB', 'ISSBLS', 'OSSBLS', 'DWM']
16:08 num_method: 5
16:08 directory_path: C:\Users\Projects\Online-Learning-Framework\Results\Results_Waveform_OL_100_1_1000
16:08 --------------------------------------------------------------------------------------------------utils.py: Interfaces between classifiers and strategies, enabling smooth combination and extension.
explore related resources and inspiration at:
We sincerely hope this toolkit becomes a valuable resource in your journey with online learning. Our dedicated team at the THUFDD Research Group, led by Prof. Xiao He and Prof. Donghua Zhou from the Department of Automation at Tsinghua University, is committed to driving innovation and excellence in machine learning applications for industry.
Wishing you a rewarding and inspiring learning experience!
Project contributors include:
- Zeyi Liu:
- Songqiao Hu:
- Pengyu Han:
- Jiaming Liu:
If you are interested in becoming a contributor to this project, we welcome your participation. Together, we can continue to refine and expand this toolkit to empower researchers, practitioners, and enthusiasts in the field.
Please feel free to get in touch!
- Contact: Zeyi Liu
- Email: liuzy21@mails.tsinghua.edu.cn
We look forward to your participation and collaboration to push this project forward! ๐ช





