Code Monkey home page Code Monkey logo

primenet's Introduction

PrimeNet : Pre-Training for Irregular Multivariate Time Series

This is the official PyTorch implementation of the AAAI 2023 paper PrimeNet: Pre-Training for Irregular Multivariate Time Series.

alt text

Quick Start

git clone https://github.com/ranakroychowdhury/PrimeNet.git

Datasets

Activity

Run preprocess/download_activity.sh to download and place the data under the proper directory.

Run preprocess/preprocess_activity.py to preprocess the data.

MIMIC-III

Follow the instruction from interp-net to download and preprocess the data.

Appliances Energy

Download the dataset.

Run preprocess/preprocess_ae.py to preprocess the data.

PhysioNet

Run preprocess/preprocess_physionet.py to download and preprocess the data.

The data directory structure should be the same as that in data.zip. Extract data.zip to run experiments with a sample toy dataset.

data/

pretrain/

X_train.pt
X_val.pt

finetune/

X_train.pt
y_train.pt
X_val.pt
y_val.pt
X_test.pt
y_test.pt

Pre-training

Run pretrain.sh to run pretraining experiments on a dataset. The pretrained model is saved under ./models/ and the pretraining results are stored under ./results/. The arguments for pretraining are explained in pretrain.py.

sh pretrain.sh

Fine-tuning and Evaluation

Run finetune.sh to run finetuning experiments on a dataset. The pretrained model saved during the pretraining experiment under ./models/ is used for finetuning. The name of the pretrained model to use is added as an argument in the finetuning command. The finetuning results are stored under ./results/. The arguments for finetuning are explained in finetune.py.

sh finetune.sh

Reference

primenet's People

Contributors

ranakroychowdhury avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.