This is the companion repository for our paper titled "Data augmentation using synthetic data for time series classification with deep residual networks". This paper has been accepted for an oral presentation at the Workshop on Advanced Analytics and Learning on Temporal Data (AALTD) 2018 in the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML/PKDD) 2018.
The data used in this project comes from the UCR archive, which contains the 85 univariate time series datasets we used in our experiements.
The code is divided as follows:
- The distance folder contains the DTW distance in Cython instead of pure python in order to reduce the running time.
- The dba.py file contains the DBA algorithm.
- The utils folder contains the necessary functions to read the datasets and visualize the plots.
- The knn.py file contains the K nearest neighbor algorithm which is mainly used when computing the weights for the data augmentation technique.
- The resnet.py file contains the keras and tesnorflow code to define the architecture and train the deep learning model.
- The augment.py file contains the method that generates the random weights (Average Selected) with a function that does the actual augmentation for a given training set of time series.
All python packages needed are listed in utils/pip-requirements.txt file and can be installed simply using the pip command for python3.6.
- Cython and run
./utils/build-cython.sh
to generate the necessary cython files. - numpy
- pandas
- sklearn
- scipy
- matplotlib
- tensorflow-gpu
- keras
The main contribution of a data augmentation technique is to improve the performance (accuracy) of a deep learning model especially for time series datasets with small training sets such as the DiatomSizeReduction (the smallest in the UCR archive) where we managed to increase the model's accuracy from 30% (without data augmentation) to 96% with data augmentation for a residual network architecture.
Meat | DiatomSizeReduction |
---|---|
If you re-use this work, please cite:
@InProceedings{IsmailFawaz2018,
Title = {Data augmentation using synthetic data for time series classification with deep residual networks},
Author = {Ismail Fawaz, Hassan and Forestier, Germain and Weber, Jonathan and Idoumghar, Lhassane and Muller, Pierre-Alain},
Booktitle = {International Workshop on Advanced Analytics and Learning on Temporal Data, {ECML} {PKDD}},
Year = {2018}
}
We would like to thank NVIDIA Corporation for the Quadro P6000 grant and the Mésocentre of Strasbourg for providing access to the cluster.