/Time2State

An unsupervised framework for inferring the latent states in time series data

Primary LanguageJupyter NotebookMIT LicenseMIT

Time2State

This is the repository for the paper entitled "Time2State: An Unsupervised Framework for Inferring the Latent State in Time Series Data".

Installation

Running Time2State requires the installation of other packages.

# Install TSpy
git clone git@github.com:Lab-ANT/TSpy
cd TSpy
pip install -r requirements.txt
python setup.py install
cd ..

# Clone Time2State
git clone git@github.com:Lab-ANT/Time2State
cd Time2State
pip install -r requirements.txt

Data Preparation

Download PAMAP2 and USC-HAD and put them in the following position.

.
├── data
│   ├── ActRecTut
│   ├── synthetic_data_for_segmentation
│   ├── MoCap
│   ├── PAMAP2
│   │   ├── Protocol
│   │   │   ├── subject101.dat
│   │   │   ├── ...
│   ├── USC-HAD
│   │   ├── Subject1
│   │   ├── Subject2
│   │   ├── ...

Once the data is placed correctly, run the following script.

python ./scripts/prepare_data.py

How to Run

run the *.py files in ./experiments directly

Note

We have newly added a comparison between FLOSS and Time2State, the implementation code and corresponding technique report are saved in the supplements/ folder of this project. For more details, please see the README file in supplements/Compare_With_FOSS/