⚠️ Alert: If you are using this code with Keras v3, make sure you are using Keras ≥ 3.6.0.
Earlier versions of Keras v3 do not honortrainable=False
, which will result in training hand-crafted filters in LITE and COCALITE unexpectedly.
This is the source code of our paper "COCALITE: A Hybrid Model COmbining CAtch22 and LITE for Time Series Classification" [pdf] accepted in the 2024 IEEE International Conference on Big Data (BigData) This work was done by Oumaima Badi, Maxime Devanne, Ali Ismail-Fawaz, Javidan Abdullayev, Vincent Lemaire, Stefano Berretti, Jonathan Weber and Germain Forestier.
Time series classification has achieved significant advancements through deep learning models; however, these models often suffer from high complexity and computational costs. To address these challenges while maintaining effectiveness, we introduce COCALITE, an innovative hybrid model that combines the efficient LITE model with an augmented version incorporating Catch22 features during training. COCALITE operates with only 4.7% of the parameters of the state-of-the-art Inception model, significantly reducing computational overhead. By integrating these complementary approaches, COCALITE leverages both effective feature engineering and deep learning techniques to enhance classification accuracy. Our extensive evaluation across 128 datasets from the UCR archive demonstrates that COCALITE achieves competitive performance, offering a compelling solution for resource-constrained environments.
The objective of this project is to enhance performance and maintain computational efficiency by integrating engineered feature vectors with features learned from deep learning models. The project explores various methodologies, and evaluates the impact of these strategies on time series classification tasks.
Please refer to the requirements.txt
file and install the required packages using:
pip install -r requirements.txt
The project requires a YAML configuration file named config.yaml
, which includes the following parameters:
datasets
: List of dataset names to process.dataset_repo
: Path to the dataset repository.results_directory
: Directory to save results.features_directory
: Directory for feature files.models_directory
: Directory for model files.pretrained_models_directory
: Directory for pre-trained models.approach
: Approach to use (options:"concatenation"
,"finetuning"
,"from_scratch"
).task
: Task to perform (options:"training"
,"evaluation"
,"concatenate_features"
).tiny_lite
: Boolean indicating if using the tiny version of the model.use_catch22
: Boolean indicating if using Catch22 features.use_ensemble
: Boolean indicating if using ensemble methods.
Ensure that the config.yaml
file is properly configured to suit your needs. This file directs the script on which datasets to use, their locations, and the approach and tasks to perform.
To start processing datasets according to the specified configuration, execute the main script:
python main.py
Purpose This approach combines features from different sources to create a unified feature set.
Combines features from the specified datasets using pre-trained models along with pre-computed Catch22 features. It trains and evaluates models based on the value of use_ensemble, which determines whether to ensemble the five models or compute the mean accuracy across models.
Purpose: This approach fine-tunes pre-trained models by concatenating Catch22 features with the latent space of the model and then resuming training.
training: Trains the models on the specified datasets.
evaluation: Evaluates the performance of fine-tuned models on the datasets.
Purpose This approach involves training models from scratch, without utilizing pre-trained weight, starting with initial model parameters.
training: Trains models from scratch using the specified datasets.
evaluation: Evaluates the performance of models trained from scratch on the datasets.
Contributions are welcome! Please submit issues, pull requests, or suggestions. Ensure that contributions align with the project's goals.
@inproceedings{badi2024cocalite,
title={COCALITE: A Hybrid Model COmbining CAtch22 and LITE for Time Series Classification},
author={Badi, Oumaima and Devanne, Maxime and Ismail-Fawaz, Ali and Abdullayev, Javidan and Lemaire, Vincent and Berretti, Stefano and Weber, Jonathan and Forestier, Germain},
booktitle={2024 IEEE International Conference on Big Data (BigData)},
pages={1229--1236},
year={2024},
organization={IEEE}
}
This work was supported by the ANR DELEGATION project (grant ANR-21-CE23-0014) of the French Agence Nationale de la Recherche. The authors would like to acknowledge the High Performance Computing Center of the University of Strasbourg for supporting this work by providing scientific support and access to computing resources. Part of the computing resources were funded by the Equipex Equip@Meso project (Programme Investissements d’Avenir) and the CPER Alsacalcul/Big Data. The authors would also like to thank the creators and providers of the UCR Archive.