This is the companion repository for our paper titled "InceptionTime: Finding AlexNet for Time Series Classification" available on ArXiv.
The data used in this project comes from the UCR/UEA archive. We used the 85 datasets listed here.
You will need to install the following packages present in the requirements.txt file.
The code is divided as follows:
- The main.py python file contains the necessary code to run an experiement.
- The utils folder contains the necessary functions to read the datasets and visualize the plots.
- The classifiers folder contains two python files: (1) inception.py contains the inception network; (2) nne.py contains the code that ensembles a set of Inception networks.
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.
You should issue the following command python3 main.py InceptionTime
.
You should issue the following command python3 main.py InceptionTime_xp
.
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.
To run the experiments on the synthetic dataset, you should issue the following command python3 receptive.py
.
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.
The results-inception-128.csv file contains five individual runs of the Inception model over the 128 datasets from the UCR 2018 archive.
If you would like to generate such a diagram, take a look at this code!
These plots were generated using the matplotlib library.
Accuracy vs train size | Accuracy vs series length |
---|---|
This plot was generated by issuing this command python3 receptive.py plot_results
.
Receptive field effect | Depth effect |
---|---|
If you re-use this work, please cite:
@article{IsmailFawaz2019inceptionTime,
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 = {ArXiv},
Year = {2019}
}
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.