Skip to content

Latest commit

 

History

History
81 lines (72 loc) · 2.71 KB

README.md

File metadata and controls

81 lines (72 loc) · 2.71 KB

Preamble

This code is the one used to generate results presented in the paper Efficient Temporal Kernels between Feature Sets for Time Series Classification. When using this code, please cite:

@inproceedings{tavenard:halshs-01561461,
  TITLE = {{Efficient Temporal Kernels between Feature Sets for Time Series Classification}},
  AUTHOR = {Tavenard, Romain and Malinowski, Simon and Chapel, Laetitia and Bailly, Adeline and Sanchez, Heider and Bustos, Benjamin},
  URL = {https://halshs.archives-ouvertes.fr/halshs-01561461},
  BOOKTITLE = {{European Conference on Machine Learning and Principles and Practice of Knowledge Discovery}},
  ADDRESS = {Skopje, Macedonia},
  YEAR = {2017},
  MONTH = Sep,
  KEYWORDS = {Time series classification},
  PDF = {https://halshs.archives-ouvertes.fr/halshs-01561461/file/paper.pdf},
  HAL_ID = {halshs-01561461},
  HAL_VERSION = {v1},
}

Supplementary material

Supplementary material for this paper is available here.

Requirements

For this code to run properly, the following python packages should be installed:

numpy  
scipy  
sklearn

Also, if one wants to run experiments on the UCR dataset, she should download it from here. Then, using the software from https://github.com/a-bailly/dbotsw, she should generate time-sensitive features (cf. get_feature_vectors) into the folder datasets/ucr_t with class information inside datasets/ucr_classes.

Running

Baseline (BoW)

To run the baseline on dataset FISH with $k=1024$, run:

SOURCEDIR=/path/to/the/base/dir/of/the/project/
WORKINGDIR=${SOURCEDIR}/
EXECUTABLE=${SOURCEDIR}/ucr_bow.py
export PYTHONPATH="${PYTHONPATH}:${SOURCEDIR}"
cd ${WORKINGDIR}
python ${EXECUTABLE} FISH 1024

SQFD-KM

To run the SQFD-KM method on dataset FISH with $k=256$, run:

SOURCEDIR=/path/to/the/base/dir/of/the/project/
WORKINGDIR=${SOURCEDIR}/
EXECUTABLE=${SOURCEDIR}/ucr_sqfd_km.py
export PYTHONPATH="${PYTHONPATH}:${SOURCEDIR}"
cd ${WORKINGDIR}
python ${EXECUTABLE} FISH 256

SQFD-Nystroem

To run the SQFD-Nystroem method on dataset FISH with $D=1024$, run:

SOURCEDIR=/path/to/the/base/dir/of/the/project/
WORKINGDIR=${SOURCEDIR}/
EXECUTABLE=${SOURCEDIR}/ucr_sqfd_nystroem.py
export PYTHONPATH="${PYTHONPATH}:${SOURCEDIR}"
cd ${WORKINGDIR}
python ${EXECUTABLE} FISH 1024

SQFD-Fourier

To run the SQFD-Fourier method on dataset FISH with $D=1024$, run:

SOURCEDIR=/path/to/the/base/dir/of/the/project/
WORKINGDIR=${SOURCEDIR}/
EXECUTABLE=${SOURCEDIR}/ucr_sqfd_fourier.py
export PYTHONPATH="${PYTHONPATH}:${SOURCEDIR}"
cd ${WORKINGDIR}
python ${EXECUTABLE} FISH 1024