Skip to content

rong-hash/Time2GraphRework

Repository files navigation

Time2GraphRework

Improvement of shapelet extraction for Time2Graph

AQOURSNet: Time2Graph Rework

Ziyuan Chen, Zhirong Chen | July 2022
Summer Research @ Yang Yang Lab, Zhejiang University

This work is protected under the MIT License.
Copyright (c) 2022 Ziyuan Chen & Zhirong Chen unless otherwise noted.


Autoencoded
Quantification
Of
Unsupervised
Representative
Shapelets


Running the Program

$ python mainczr.py
  • WARNING: the condensed ts2vec module has not been thoroughly tested. Clone yuezhihan/ts2vec under the same folder in case it fails.

Model Pipeline

  1. Data preparation
  2. Time series ---extract---> Shapelets
  3. Time series & shapelets ---embed---> Series embedding
  4. Series embedding ---construct---> Graph
  5. Graph ---embed---> Graph embedding
  6. Graph embedding ---predict---> Predicted classes

Folder Structure

  • ref_papers - papers associated with shapelets providing essential background knowledge
  • cached_programs - historical versions and experiments of KMeans, SVM, MLP, ResNet, Time2Vec, hierarchies, etc.
    • WARNING: Codes in the cache may not run properly since they are not optimized for environment compatibility.
  • affiliated_licenses - LICENSEs for code segments from yuezhihan, subhadarship, DynamicTimeWarping, and pyg-team@GitHub.
  • ucr_dataset - a neatly formatted version of the UCR Dataset in .npz format
    • The numpy arrays contained in each file have keys train_data, train_label, test_data, test_label
    • *_data has shape (num_samples, num_features), *_label has shape (num_samples,)

Call Hierarchy

  • mainczr.py
    • utils.py (#0: ucr_dataset, #3 wrapper: GraphDataset)
    • construct_graph.py (#1 wrapper: extract_shapelets, #2: embed_series, #3: adjacency_matrix)
      • ts2vec.py (#1 optional enhancement: TS2Vec)
      • kmeans.py (#1: kmeans)
      • dtw
    • network.py (#4: GAT, #5: MultilayerPerceptron & FCResidualNetwork)
      • xgboost

Credits

About

Improvement of shapelet extraction for Time2Graph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published