[SDM 2022] Towards Similarity-Aware Time-Series Classification

Related tags

Deep LearningSimTSC
Overview

SimTSC

This is the PyTorch implementation of SDM2022 paper Towards Similarity-Aware Time-Series Classification. We propose Similarity-Aware Time-Series Classification (SimTSC), a conceptually simple and general framework that models similarity information with graph neural networks (GNNs). We formulate time-series classification as a node classification problem in graphs, where the nodes correspond to time-series, and the links correspond to pair-wise similarities. overview

Installation

pip3 install -r requirements.txt

Datasets

We provide an example dataset Coffee in this repo. You may download the full UCR datasets here. Multivariate datasets are provided in this link.

Quick Start

We use Coffee as an example to show how to run the code. You may easily try other datasets with arguments --dataset. We will show how to get the results for DTW+1NN, ResNet, and SimTSC.

First, prepare the dataset with

python3 create_dataset.py

Then install the python wrapper of UCR DTW library with

git clone https://github.com/daochenzha/pydtw.git
cd pydtw
pip3 install -e .
cd ..

Then compute the dtw matrix for Coffee with

python3 create_dtw.py
  1. For DTW+1NN:
python3 train_knn.py
  1. For ResNet:
python3 train_resnet.py
  1. For SimTSC:
python3 train_simtsc.py

All the logs will be saved in logs/

Multivariate Datasets Quick Start

  1. Download the datasets and pre-computed DTW with this link.

  2. Unzip the file and put it into datasets/ folder

  3. Prepare the datasets with

python3 create_dataset.py --dataset CharacterTrajectories
  1. For DTW+1NN:
python3 train_knn.py --dataset CharacterTrajectories
  1. For ResNet:
python3 train_resnet.py --dataset CharacterTrajectories
  1. For SimTSC:
python3 train_simtsc.py --dataset CharacterTrajectories

Descriptions of the Files

  1. create_dataset.py is a script to pre-process dataset and save them into npy. Some important hyperparameters are as follows.
  • --dataset: what dataset to process
  • --shot: how many training labels are given in each class
  1. create_dtw.py is a script to calculate pair-wise DTW distances of a dataset and save them into npy. Some important hyperparameters are as follows.
  • --dataset: what dataset to process
  1. train_knn.py is a script to do classfication DTW+1NN of a dataset. Some important hyperparameters are as follows.
  • --dataset: what dataset we operate on
  • --shot: how many training labels are given in each class
  1. train_resnet.py is a script to do classfication of a dataset with ResNet. Some important hyperparameters are as follows.
  • --dataset: what dataset we operate on
  • --shot: how many training labels are given in each class
  • --gpu: which GPU to use
  1. train_simtsc.py is a script to do classfication of a dataset with SimTSC. Some important hyperparameters are as follows.
  • --dataset: what dataset we operate on
  • --shot: how many training labels are given in each class
  • --gpu: which GPU to use
  • --K: number of neighbors per node in the constructed graph
  • --alpha: the scaling factor of the weights of the constructed graph
Owner
Daochen Zha
PhD student in Machine Learning and Data Mining
Daochen Zha
Hardware accelerated, batchable and differentiable optimizers in JAX.

JAXopt Installation | Examples | References Hardware accelerated (GPU/TPU), batchable and differentiable optimizers in JAX. Installation JAXopt can be

Google 621 Jan 08, 2023
This repository contains the source code for the paper First Order Motion Model for Image Animation

!!! Check out our new paper and framework improved for articulated objects First Order Motion Model for Image Animation This repository contains the s

13k Jan 09, 2023
noisy labels; missing labels; semi-supervised learning; entropy; uncertainty; robustness and generalisation.

ProSelfLC: CVPR 2021 ProSelfLC: Progressive Self Label Correction for Training Robust Deep Neural Networks For any specific discussion or potential fu

amos_xwang 57 Dec 04, 2022
DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification

DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification Created by Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, Ch

Yongming Rao 414 Jan 01, 2023
Pytorch implementation of MLP-Mixer with loading pre-trained models.

MLP-Mixer-Pytorch PyTorch implementation of MLP-Mixer: An all-MLP Architecture for Vision with the function of loading official ImageNet pre-trained p

Qiushi Yang 2 Sep 29, 2022
Adaptive Pyramid Context Network for Semantic Segmentation (APCNet CVPR'2019)

Adaptive Pyramid Context Network for Semantic Segmentation (APCNet CVPR'2019) Introduction Official implementation of Adaptive Pyramid Context Network

21 Nov 09, 2022
Contextual Attention Network: Transformer Meets U-Net

Contextual Attention Network: Transformer Meets U-Net Contexual attention network for medical image segmentation with state of the art results on skin

Reza Azad 67 Nov 28, 2022
A package, and script, to perform imaging transcriptomics on a neuroimaging scan.

Imaging Transcriptomics Imaging transcriptomics is a methodology that allows to identify patterns of correlation between gene expression and some prop

Alessio Giacomel 10 Dec 27, 2022
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow

TensorFlow 101: Introduction to Deep Learning I have worked all my life in Machine Learning, and I've never seen one algorithm knock over its benchmar

Sefik Ilkin Serengil 896 Jan 04, 2023
Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.

This is the Vowpal Wabbit fast online learning code. Why Vowpal Wabbit? Vowpal Wabbit is a machine learning system which pushes the frontier of machin

Vowpal Wabbit 8.1k Jan 06, 2023
Code for Mesh Convolution Using a Learned Kernel Basis

Mesh Convolution This repository contains the implementation (in PyTorch) of the paper FULLY CONVOLUTIONAL MESH AUTOENCODER USING EFFICIENT SPATIALLY

Yi_Zhou 35 Jan 03, 2023
Code for paper 'Hand-Object Contact Consistency Reasoning for Human Grasps Generation' at ICCV 2021

GraspTTA Hand-Object Contact Consistency Reasoning for Human Grasps Generation (ICCV 2021). Project Page with Videos Demo Quick Results Visualization

Hanwen Jiang 47 Dec 09, 2022
GenGNN: A Generic FPGA Framework for Graph Neural Network Acceleration

GenGNN: A Generic FPGA Framework for Graph Neural Network Acceleration Stefan Abi-Karam*, Yuqi He*, Rishov Sarkar*, Lakshmi Sathidevi, Zihang Qiao, Co

Sharc-Lab 19 Dec 15, 2022
Pytorch implementation of AREL

Status: Archive (code is provided as-is, no updates expected) Agent-Temporal Attention for Reward Redistribution in Episodic Multi-Agent Reinforcement

8 Nov 25, 2022
Official implementation of "Towards Good Practices for Efficiently Annotating Large-Scale Image Classification Datasets" (CVPR2021)

Towards Good Practices for Efficiently Annotating Large-Scale Image Classification Datasets This is the official implementation of "Towards Good Pract

Sanja Fidler's Lab 52 Nov 22, 2022
CAPRI: Context-Aware Interpretable Point-of-Interest Recommendation Framework

CAPRI: Context-Aware Interpretable Point-of-Interest Recommendation Framework This repository contains a framework for Recommender Systems (RecSys), a

RecSys Lab 8 Jul 03, 2022
SE3 Pose Interp - Interpolate camera pose or trajectory in SE3, pose interpolation, trajectory interpolation

SE3 Pose Interpolation Pose estimated from SLAM system are always discrete, and

Ran Cheng 4 Dec 15, 2022
[CVPRW 21] "BNN - BN = ? Training Binary Neural Networks without Batch Normalization", Tianlong Chen, Zhenyu Zhang, Xu Ouyang, Zechun Liu, Zhiqiang Shen, Zhangyang Wang

BNN - BN = ? Training Binary Neural Networks without Batch Normalization Codes for this paper BNN - BN = ? Training Binary Neural Networks without Bat

VITA 40 Dec 30, 2022
Recognize Handwritten Digits using Deep Learning on the browser itself.

MNIST on the Web An attempt to predict MNIST handwritten digits from my PyTorch model from the browser (client-side) and not from the server, with the

Harjyot Bagga 7 May 28, 2022
AI-Bot - 一个基于watermelon改造的OpenAI-GPT-2的智能机器人

AI-Bot 一个基于watermelon改造的OpenAI-GPT-2的智能机器人 在Binder上直接运行测试 目前有两种实现方式 TF2的GPT-2 TF

9 Nov 16, 2022