Home

Awesome

InceptionTime: Finding AlexNet for Time Series Classification

This is the companion repository for our paper titled InceptionTime: Finding AlexNet for Time Series Classification published in Data Mining and Knowledge Discovery and also available on ArXiv.

Inception module

inception module

Data

The data used in this project comes from the UCR/UEA archive. We used the 85 datasets listed here.

Requirements

You will need to install the following packages present in the requirements.txt file.

Code

The code is divided as follows:

Adapt the code for your PC

You should first consider changing the following line. This is the root file of everything (data and results) let's call it root_dir.

After that you should create a folder called archives inside your root_dir, which should contain the folder UCR_TS_Archive_2015. The latter will contain a folder for each dataset called dataset_name, which can be downloaded from this website.

The names of the datasets are present here. You can comment this line to run the experiments on all datasets.

Once you have done all that, you can proceed to run on a single archive.

Run InceptionTime on a single Archive

You should issue the following command python3 main.py InceptionTime.

Run the hyperparameter search for InceptionTime on a single Archive

You should issue the following command python3 main.py InceptionTime_xp.

Run the length experiment on the InlineSkate dataset

You should first issue the following command python3 main.py run_length_xps to generate the resamples. Then you should issue the following command python3 main.py InceptionTime but make sure that the InlineSkateXPs is chosen here.

Receptive field

To run the experiments on the synthetic dataset, you should issue the following command python3 receptive.py.

Results

The result (i.e. accuracy) for each dataset will be present in root_dir/results/nne/incepton-0-1-2-4-/UCR_TS_Archive_2015/dataset_name/df_metrics.csv.

The raw results can be found here and generated using the following command python3 main.py generate_results_csv.

We added the full results for the 128 datasets from the UCR archive, they can be found here.

<!-- We have added the full results for the 30 datasets from the [MTS UEA archive](http://www.timeseriesclassification.com/), they can be found [here](https://github.com/hfawaz/InceptionTime/blob/master/results-mts.csv). -->

The results-inception-128.csv file contains five individual runs of the Inception model over the 128 datasets from the UCR 2018 archive.

Critical difference diagrams

If you would like to generate such a diagram, take a look at this code!

cd diagram

Training time plots

These plots were generated using the matplotlib library.

Training time vs train sizeTraining time vs series length
training time sizetraining time length

Receptive field

This plot was generated by issuing this command python3 receptive.py plot_results.

Receptive field effectDepth effect
receptive fieldtraining time length

Reference

If you re-use this work, please cite:

@article{IsmailFawaz2020inceptionTime,
  Title                    = {InceptionTime: Finding AlexNet for Time Series Classification},
  Author                   = {Ismail Fawaz, Hassan and Lucas, Benjamin and Forestier, Germain and Pelletier, Charlotte and Schmidt, Daniel F. and Weber, Jonathan and Webb, Geoffrey I. and Idoumghar, Lhassane and Muller, Pierre-Alain and Petitjean, François},
  journal                  = {Data Mining and Knowledge Discovery},
  Year                     = {2020}
}

Acknowledgement

We would like to thank the providers of the UCR/UEA archive. We would also like to thank NVIDIA Corporation for the Quadro P6000 grant and the Mésocentre of Strasbourg for providing access to the cluster.