Skip to content

Commit

Permalink
Merge pull request #374 from WenjieDu/dev
Browse files Browse the repository at this point in the history
Add SaitsEmbedding, fix failed CI on macOS with Python3.7, and update docs
  • Loading branch information
WenjieDu authored Apr 30, 2024
2 parents ef9a9b6 + f332a0c commit bfc4d6b
Show file tree
Hide file tree
Showing 146 changed files with 453 additions and 502 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-13]
python-version: ["3.7", "3.11"]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-13]
python-version: ["3.7", "3.11"]

steps:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The rest of this readme file is organized as follows:

## ❖ Available Algorithms
PyPOTS supports imputation, classification, clustering, forecasting, and anomaly detection tasks on multivariate partially-observed
time series with missing values. The table below shows the availability of each algorithm in PyPOTS for different tasks.
time series with missing values. The table below shows the availability of each algorithm (sorted by Year) in PyPOTS for different tasks.
The symbol ✅ indicates the algorithm is available for the corresponding task (note that models will be continuously updated
in the future to handle tasks that are not currently supported. Stay tuned❗️).
The task types are abbreviated as follows: **`IMPU`**: Imputation; **`FORE`**: Forecasting;
Expand All @@ -93,8 +93,10 @@ The paper references are all listed at the bottom of this readme file.
This functionality is implemented with the [Microsoft NNI](https://github.com/microsoft/nni) framework. You may want to refer to our time-series
imputation survey repo [Awesome_Imputation](https://github.com/WenjieDu/Awesome_Imputation) to see how to config and
tune the hyperparameters.
🔥 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)

🔥 Note that Transformer, iTransformer, FreTS, Crossformer, PatchTST, DLinear, ETSformer, FiLM, 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](https://arxiv.org/pdf/2202.08516).**

| **Type** | **Algo** | **IMPU** | **FORE** | **CLAS** | **CLUS** | **ANOD** | **Year** |
Expand Down
5 changes: 5 additions & 0 deletions pypots/classification/brits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
<https://papers.nips.cc/paper_files/paper/2018/file/734e6bfcd358e25ac1db0a4241b95651-Paper.pdf>`_
Notes
-----
This implementation is inspired by the official one https://github.com/caow13/BRITS.
The bugs in the original implementation are fixed here.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
12 changes: 2 additions & 10 deletions pypots/classification/brits/core.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
"""
The implementation of BRITS for the partially-observed time-series classification task.
Refer to the paper "Cao, W., Wang, D., Li, J., Zhou, H., Li, L., & Li, Y. (2018).
BRITS: Bidirectional Recurrent Imputation for Time Series. NeurIPS 2018."
Notes
-----
Partial implementation uses code from https://github.com/caow13/BRITS. The bugs in the original implementation
are fixed here.
The core wrapper assembles the submodules of BRITS classification model
and takes over the forward progress of the algorithm.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion pypots/classification/brits/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for model BRITS.
Dataset class for the classification model BRITS.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
9 changes: 0 additions & 9 deletions pypots/classification/brits/model.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
"""
The implementation of BRITS for the partially-observed time-series classification task.
Refer to the paper "Wei Cao, Dong Wang, Jian Li, Hao Zhou, Lei Li, and Yitan Li.
BRITS: Bidirectional recurrent imputation for time series.
In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018."
Notes
-----
Partial implementation uses code from https://github.com/caow13/BRITS.
The bugs in the original implementation are fixed here.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
4 changes: 4 additions & 0 deletions pypots/classification/grud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
Scientific Reports, 8(1):6085, April 2018.
<https://www.nature.com/articles/s41598-018-24271-9.pdf>`_
Notes
-----
This implementation is inspired by the official one https://github.com/PeterChe1990/GRU-D
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
7 changes: 2 additions & 5 deletions pypots/classification/grud/core.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"""
The implementation of GRU-D for the partially-observed time-series imputation task.
Refer to the paper "Che, Z., Purushotham, S., Cho, K., Sontag, D.A., & Liu, Y. (2018).
Recurrent Neural Networks for Multivariate Time Series with Missing Values. Scientific Reports."
The core wrapper assembles the submodules of GRU-D classification model
and takes over the forward progress of the algorithm.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion pypots/classification/grud/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for model GRU-D.
Dataset class for the classification model GRU-D.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
4 changes: 0 additions & 4 deletions pypots/classification/grud/model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""
The implementation of GRU-D for the partially-observed time-series classification task.
Refer to the paper "Zhengping Che, Sanjay Purushotham, Kyunghyun Cho, David Sontag, and Yan Liu.
Recurrent Neural Networks for Multivariate Time Series with Missing Values.
Scientific Reports, 8(1):6085, April 2018."
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
4 changes: 4 additions & 0 deletions pypots/classification/raindrop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
In ICLR, 2022.
<https://openreview.net/forum?id=Kwm8I7dU-l5>`_
Notes
-----
This implementation is inspired by the official one the official implementation https://github.com/mims-harvard/Raindrop
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
7 changes: 2 additions & 5 deletions pypots/classification/raindrop/core.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"""
The implementation of Raindrop for the partially-observed time-series classification task.
Refer to the paper "Zhang, X., Zeman, M., Tsiligkaridis, T., & Zitnik, M. (2022).
Graph-Guided Network for Irregularly Sampled Multivariate Time Series. ICLR 2022."
The core wrapper assembles the submodules of Raindrop classification model
and takes over the forward progress of the algorithm.
"""


Expand Down
2 changes: 1 addition & 1 deletion pypots/classification/raindrop/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for model Raindrop.
Dataset class for the classification model Raindrop.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
4 changes: 0 additions & 4 deletions pypots/classification/raindrop/model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""
The implementation of Raindrop for the partially-observed time-series classification task.
Refer to the paper "Xiang Zhang, Marko Zeman, Theodoros Tsiligkaridis, and Marinka Zitnik.
Graph-guided network for irregularly sampled multivariate time series.
In ICLR, 2022."
"""


Expand Down
6 changes: 2 additions & 4 deletions pypots/classification/template/core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
The implementation of YourNewModel for the partially-observed time-series classification task.
Refer to the paper "Your paper citation".
The core wrapper assembles the submodules of YourNewModel classification model
and takes over the forward progress of the algorithm.
"""

# Created by Your Name <Your contact email> TODO: modify the author information.
Expand Down
2 changes: 1 addition & 1 deletion pypots/classification/template/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for YourNewModel.
Dataset class for the classification model YourNewModel.
TODO: modify the above description for your model's dataset class.
Expand Down
2 changes: 0 additions & 2 deletions pypots/classification/template/model.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
The implementation of YourNewModel for the partially-observed time-series classification task.
Refer to the paper "Your paper citation".
TODO: modify the above description with your model's information.
"""
Expand Down
4 changes: 4 additions & 0 deletions pypots/clustering/crli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<https://ojs.aaai.org/index.php/AAAI/article/view/17070>`_
Notes
-----
This implementation is inspired by the official one https://github.com/qianlima-lab/CRLI
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
8 changes: 2 additions & 6 deletions pypots/clustering/crli/core.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""
The implementation of CRLI (Clustering Representation Learning on Incomplete time-series data) for
the partially-observed time-series clustering task.
Refer to the paper "Ma, Q., Chen, C., Li, S., & Cottrell, G. W. (2021).
Learning Representations for Incomplete Time Series Clustering. AAAI 2021."
The core wrapper assembles the submodules of CRLI clustering model
and takes over the forward progress of the algorithm.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion pypots/clustering/crli/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for model GRU-D.
Dataset class for the clustering model CRLI.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
4 changes: 0 additions & 4 deletions pypots/clustering/crli/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
The implementation of CRLI (Clustering Representation Learning on Incomplete time-series data) for
the partially-observed time-series clustering task.
Refer to the paper "Qianli Ma, Chuxin Chen, Sen Li, and Garrison W. Cottrell.
Learning Representations for Incomplete Time Series Clustering.
In AAAI, 35(10):8837–8846, May 2021."
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
6 changes: 2 additions & 4 deletions pypots/clustering/template/core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
The implementation of YourNewModel for the partially-observed time-series clustering task.
Refer to the paper "Your paper citation".
The core wrapper assembles the submodules of YourNewModel clustering model
and takes over the forward progress of the algorithm.
"""

# Created by Your Name <Your contact email> TODO: modify the author information.
Expand Down
2 changes: 1 addition & 1 deletion pypots/clustering/template/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for YourNewModel.
Dataset class for the clustering model YourNewModel.
TODO: modify the above description for your model's dataset class.
Expand Down
2 changes: 0 additions & 2 deletions pypots/clustering/template/model.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
The implementation of YourNewModel for the partially-observed time-series clustering task.
Refer to the paper "Your paper citation".
TODO: modify the above description with your model's information.
"""
Expand Down
4 changes: 4 additions & 0 deletions pypots/clustering/vader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
GigaScience, 8(11):giz134, November 2019.
<https://academic.oup.com/gigascience/article-pdf/8/11/giz134/30797160/giz134.pdf>`_
Notes
-----
This implementation is inspired by the official one https://github.com/johanndejong/VaDER
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
8 changes: 2 additions & 6 deletions pypots/clustering/vader/core.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""
The implementation of VaDER for the partially-observed time-series clustering task.
Refer to the paper "Jong, J.D., Emon, M.A., Wu, P., Karki, R., Sood, M., Godard, P., Ahmad, A., Vrooman, H.A.,
Hofmann-Apitius, M., & Fröhlich, H. (2019).
Deep learning for clustering of multivariate clinical patient trajectories with missing values. GigaScience."
The core wrapper assembles the submodules of VaDER clustering model
and takes over the forward progress of the algorithm.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion pypots/clustering/vader/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for model GRU-D.
Dataset class for the clustering model VaDER.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
5 changes: 0 additions & 5 deletions pypots/clustering/vader/model.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
"""
The implementation of VaDER for the partially-observed time-series clustering task.
Refer to the paper "Johann de Jong, Mohammad Asif Emon, Ping Wu, Reagon Karki, Meemansa Sood, Patrice Godard,
Ashar Ahmad, Henri Vrooman, Martin Hofmann-Apitius, and Holger Fröhlich.
Deep learning for clustering of multivariate clinical patient trajectories with missing values.
GigaScience, 8(11):giz134, November 2019."
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
4 changes: 4 additions & 0 deletions pypots/forecasting/bttf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1–1, 2021.
<https://arxiv.org/pdf/1910.06366>`_
Notes
-----
This numpy implementation is the same with the official one from https://github.com/xinychen/transdim.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
12 changes: 1 addition & 11 deletions pypots/forecasting/bttf/core.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
"""
The implementation of BTTF (Bayesian Temporal Tensor Factorization) for the partially-observed time-series
forecasting task.
Refer to the paper "Chen, X., & Sun, L. (2021).
Bayesian Temporal Factorization for Multidimensional Time Series Prediction.
IEEE transactions on pattern analysis and machine intelligence."
Notes
-----
This numpy implementation is the same with the official one from https://github.com/xinychen/transdim.
The core wrapper assembles the submodules of BTTF forecasting model.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
8 changes: 0 additions & 8 deletions pypots/forecasting/bttf/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
The implementation of BTTF (Bayesian Temporal Tensor Factorization) for the partially-observed time-series
forecasting task.
Refer to the paper "Xinyu Chen and Lijun Sun.
Bayesian Temporal Factorization for Multidimensional Time Series Prediction.
IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1–1, 2021."
Notes
-----
This numpy implementation is the same with the official one from https://github.com/xinychen/transdim.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
9 changes: 0 additions & 9 deletions pypots/forecasting/bttf/submodules.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
"""
The implementation of the modules for BTTF (Bayesian Temporal Tensor Factorization).
Refer to the paper "Chen, X., & Sun, L. (2021).
Bayesian Temporal Factorization for Multidimensional Time Series Prediction.
IEEE transactions on pattern analysis and machine intelligence."
Notes
-----
This numpy implementation is the same with the official one from https://github.com/xinychen/transdim.
"""

Expand Down
4 changes: 4 additions & 0 deletions pypots/forecasting/csdi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
In NeurIPS, 2021.
<https://proceedings.neurips.cc/paper_files/paper/2021/file/cfe8504bda37b575c70ee1a8276f3486-Paper.pdf>`_
Notes
-----
This implementation is inspired by the official one the official implementation https://github.com/ermongroup/CSDI
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
5 changes: 5 additions & 0 deletions pypots/forecasting/csdi/core.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
The core wrapper assembles the submodules of CSDI forecasting model
and takes over the forward progress of the algorithm.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
# License: BSD-3-Clause

Expand Down
2 changes: 1 addition & 1 deletion pypots/forecasting/csdi/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dataset class for the forecasting model CSDI.
"""

# Created by Wenjie Du <wenjay.du@gmail.com>
Expand Down
Loading

0 comments on commit bfc4d6b

Please sign in to comment.