Welcome to PyPOTS docs!#

PyPOTS logo

A Python Toolbox for Data Mining on Partially-Observed Time Series

Python version powered by Pytorch the latest release version BSD-3 license Community GitHub Contributors GitHub Repo stars GitHub Repo forks Code Climate maintainability Coveralls coverage GitHub Testing Docs building Conda downloads PyPI downloads arXiv DOI Visiting number

⦿ Motivation: Due to all kinds of reasons like failure of collection sensors, communication error, and unexpected malfunction, missing values are common to see in time series from the real-world environment. This makes partially-observed time series (POTS) a pervasive problem in open-world modeling and prevents advanced data analysis. Although this problem is important, the area of data mining on POTS still lacks a dedicated toolkit. PyPOTS is created to fill in this blank.

⦿ Mission: PyPOTS is born to become a handy toolbox that is going to make data mining on POTS easy rather than tedious, to help engineers and researchers focus more on the core problems in their hands rather than on how to deal with the missing parts in their data. PyPOTS will keep integrating classical and the latest state-of-the-art data mining algorithms for partially-observed multivariate time series. For sure, besides various algorithms, PyPOTS is going to have unified APIs together with detailed documentation and interactive examples across algorithms as tutorials.

🤗 Please star this repo to help others notice PyPOTS if you think it is a useful toolkit. Please properly cite PyPOTS in your publications if it helps with your research. This really means a lot to our open-source research. Thank you!

The rest of this readme file is organized as follows: ❖ PyPOTS Ecosystem, ❖ Installation, ❖ Usage, ❖ Available Algorithms, ❖ Citing PyPOTS, ❖ Contribution, ❖ Community.

❖ PyPOTS Ecosystem#

At PyPOTS, things are related to coffee, which we’re familiar with. Yes, this is a coffee universe! As you can see, there is a coffee pot in the PyPOTS logo. And what else? Please read on ;-)

TSDB logo

👈 Time series datasets are taken as coffee beans at PyPOTS, and POTS datasets are incomplete coffee beans with missing parts that have their own meanings. To make various public time-series datasets readily available to users, Time Series Data Beans (TSDB) is created to make loading time-series datasets super easy! Visit TSDB right now to know more about this handy tool 🛠, and it now supports a total of 168 open-source datasets!

PyGrinder logo

👉 To simulate the real-world data beans with missingness, the ecosystem library PyGrinder, a toolkit helping grind your coffee beans into incomplete ones, is created. Missing patterns fall into three categories according to Robin’s theory [1]: MCAR (missing completely at random), MAR (missing at random), and MNAR (missing not at random). PyGrinder supports all of them and additional functionalities related to missingness. With PyGrinder, you can introduce synthetic missing values into your datasets with a single line of code.

BrewPOTS logo

👈 Now we have the beans, the grinder, and the pot, how to brew us a cup of coffee? Tutorials are necessary! Considering the future workload, PyPOTS tutorials is released in a single repo, and you can find them in BrewPOTS. Take a look at it now, and learn how to brew your POTS datasets!

☕️ Welcome to the universe of PyPOTS. Enjoy it and have fun!

BrewPOTS logo

❖ Installation#

PyPOTS is available on both PyPI and Anaconda.

Refer to the page Installation to see different ways of installing PyPOTS.

❖ Usage#

Besides BrewPOTS, you can also find a simple and quick-start tutorial notebook on Google Colab with this link. You can also raise an issue or ask in our community.

Additionally, we present you a usage example of imputing missing values in time series with PyPOTS in Section Quick-start Examples, you can click it to view.

❖ Available Algorithms#

PyPOTS supports imputation, classification, clustering, and forecasting tasks on multivariate time series with missing values. The currently available algorithms of four tasks are cataloged in the following table with four partitions. The paper references are provided and you can click them to check out.

🌟 Since v0.2, all neural-network models in PyPOTS has got hyperparameter-optimization support. This functionality is implemented with the Microsoft NNI framework.

🔥 Note that Transformer, Crossformer, PatchTST, DLinear, ETSformer, FEDformer, Informer, Autoformer are not proposed as imputation methods in their original papers, and they cannot accept POTS as input. To make them applicable on POTS data, we apply the embedding strategy and training approach (ORT+MIT) the same as we did in SAITS paper.

Task

Type

Algorithm

Year

Reference

Imputation

Neural Net

SAITS (Self-Attention-based Imputation for Time Series)

2023

[2]

Imputation

Neural Net

Transformer

2017

[3]

Imputation

Neural Net

Crossformer (Transformer Utilizing Cross-Dimension Dependency for Multivariate Time Series Forecasting)

2023

[4]

Imputation

Neural Net

TimesNet (Temporal 2D-Variation Modeling for General Time Series Analysis)

2023

[5]

Imputation

Neural Net

PatchTST (A Time Series is Worth 64 Words: Long-Term Forecasting with Transformers)

2023

[4]

Imputation

Neural Net

DLinear (Are transformers effective for time series forecasting?)

2023

[6]

Imputation

Neural Net

ETSformer (Exponential Smoothing Transformers for Time-series Forecasting)

2023

[7]

Imputation

Neural Net

FEDformer (Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting)

2022

[8]

Imputation

Neural Net

Informer (Beyond Efficient Transformer for Long Sequence Time-Series Forecasting)

2021

[9]

Imputation

Neural Net

Autoformer (Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting)

2021

[10]

Imputation

Neural Net

US-GAN (Unsupervised GAN for Multivariate Time Series Imputation)

2021

[11]

Imputation

Neural Net

CSDI (Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation)

2021

[12]

Imputation

Neural Net

GP-VAE (Gaussian Process Variational Autoencoder)

2020

[13]

Imputation, Classification

Neural Net

BRITS (Bidirectional Recurrent Imputation for Time Series)

2018

[14]

Imputation

Neural Net

M-RNN (Multi-directional Recurrent Neural Network)

2019

[15]

Imputation

Naive

LOCF/NOCB(Last Observation Carried Forward/Next Observation Carried Backward)

/

/

Imputation

Naive

Median (Median Value Imputation)

/

/

Imputation

Naive

Mean (Mean Value Imputation)

/

/

Classification

Neural Net

GRU-D

2018

[16]

Classification

Neural Net

Raindrop

2022

[17]

Clustering

Neural Net

CRLI (Clustering Representation Learning on Incomplete time-series data)

2021

[18]

Clustering

Neural Net

VaDER (Variational Deep Embedding with Recurrence)

2019

[19]

Forecasting

Probabilistic

BTTF (Bayesian Temporal Tensor Factorization)

2021

[20]

❖ Citing PyPOTS#

[Updates in Jun 2023] 🎉A short version of the PyPOTS paper is accepted by the 9th SIGKDD international workshop on Mining and Learning from Time Series (MiLeTS’23). Besides, PyPOTS has been included as a PyTorch Ecosystem project.

The paper introducing PyPOTS is available on arXiv at this URL., and we are pursuing to publish it in prestigious academic venues, e.g. JMLR (track for Machine Learning Open Source Software). If you use PyPOTS in your work, please cite it as below and 🌟star PyPOTS repository to make others notice this library. 🤗

 1@article{du2023pypots,
 2title={{PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series}},
 3author={Wenjie Du},
 4year={2023},
 5eprint={2305.18811},
 6archivePrefix={arXiv},
 7primaryClass={cs.LG},
 8url={https://arxiv.org/abs/2305.18811},
 9doi={10.48550/arXiv.2305.18811},
10}

or

Wenjie Du. (2023). PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series. arXiv, abs/2305.18811. https://doi.org/10.48550/arXiv.2305.18811

❖ Contribution#

You’re very welcome to contribute to this exciting project!

By committing your code, you’ll

  1. make your well-established model out-of-the-box for PyPOTS users to run, and help your work obtain more exposure and impact. Take a look at our inclusion criteria. You can utilize the template folder in each task package (e.g. pypots/imputation/template) to quickly start;

  2. become one of PyPOTS contributors and be listed as a volunteer developer on the PyPOTS website;

  3. get mentioned in our release notes;

You can also contribute to PyPOTS by simply staring🌟 this repo to help more people notice it. Your star is your recognition to PyPOTS, and it matters!

The lists of PyPOTS stargazers and forkers are shown below, and we’re so proud to have more and more awesome users, as well as more bright ✨stars:

PyPOTS stargazers PyPOTS forkers

👀 Check out a full list of our users’ affiliations on PyPOTS website here !

❖ Community#

We care about the feedback from our users, so we’re building PyPOTS community on

  • Slack. General discussion, Q&A, and our development team are here;

  • LinkedIn. Official announcements and news are here;

  • WeChat (微信公众号). We also run a group chat on WeChat, and you can get the QR code from the official account after following it;

If you have any suggestions or want to contribute ideas or share time-series related papers, join us and tell. PyPOTS community is open, transparent, and surely friendly. Let’s work together to build and improve PyPOTS!