Giter VIP home page Giter VIP logo

timehetnet's Introduction

TimeHetNet

Written by: Rafael Rego Drumond and Lukas Brinkmeyer

If you use this code please cite

@misc{https://doi.org/10.48550/arxiv.2204.03456,
  doi = {10.48550/ARXIV.2204.03456},
  url = {https://arxiv.org/abs/2204.03456},
  author = {Brinkmeyer, Lukas and Drumond, Rafael Rego and Burchert, Johannes and Schmidt-Thieme, Lars},
  keywords = {Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences, 68},
  title = {Few-Shot Forecasting of Time-Series with Heterogeneous Channels},
  publisher = {arXiv},
  year = {2022}
}

This code also provide an implementation for the network of Tomoharu Iwata from the paper below (we nickname it HetNet).

@article{iwata2020meta,
  title={Meta-learning from tasks with heterogeneous attribute spaces},
  author={Iwata, Tomoharu and Kumagai, Atsutoshi},
  journal={Advances in Neural Information Processing Systems},
  volume={33},
  pages={6053--6063},
  year={2020}
}

(bibtex coming soon...)

Currently it only supports Linux

This is our implementation of TimeHetNet for our paper "Few-Shot Forecasting of Time-Series with Heterogeneous Channels".

Our conda environment has been exported to thn.yaml

In order to run our code you need to download the data-sets as listed in our paper.

Pre-processing code will be available for the camera ready version. The default directory is ~/data For now, you can look into the file splits/regensplits.py on how the filenames must look like. ".npy" files are the data-sets converted to a numpy array (SAMPLESxTIMExCHANNELS). ".pkl.npy" are the same, but indicates data-sets where the size of TIME is not the consistent across SAMPLES.

Once the data-set is processed, you must run:

python generate_test_set/generate_test_set.py

to generate fixed test sets. Keep in mind this process is random and will differ from our current experiments.

once this is done you can run:

python experiment.py

make sure you test the args.py file to match the same hyper parameters as used in the paper. You might wanna change the following ones:

--grad_clip     (0.0 to deactivate, 1.0 to use it as in the paper)
--dims          (the dimensions for our inference network. You can either set to '[16,16,16]' or '[32,32,32]')
--dims_pred     ( the dimensions for our prediction network. You should set it to '[32,32,32]')
--hetmodel      ('time' for our proposed TimeHetNet, 'Normal' for Iwata's hetnet)
--block         ('gru,conv,conv,gru' is our main architecture)
--control_steps (if you wish for example to run \(t_0 + 80\) experimets, set this to 80)
--split         (a number from 0 to 4, we have a 5-fold cross validation split. This is already defined in our original code)

timehetnet's People

Contributors

radrumond avatar rafaeldrumond 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.