From 1730a1e6de0e53516d62ecc39ed6ebc4498e8f55 Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Tue, 20 Feb 2024 19:51:02 +0800 Subject: [PATCH 1/4] fix: remind how to display the figs rather than invoking plt.show(); --- pypots/utils/visual/data.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pypots/utils/visual/data.py b/pypots/utils/visual/data.py index 46193476..338b1145 100644 --- a/pypots/utils/visual/data.py +++ b/pypots/utils/visual/data.py @@ -88,7 +88,10 @@ def plot_data( plt.setp(axes[row, 0], ylabel="value") if row == -1: plt.setp(axes[-1, col], xlabel="time") - plt.show() + + logger.info( + "Plotting finished. Please invoke matplotlib.pyplot.show() to display the plot." + ) def plot_missingness( @@ -166,4 +169,7 @@ def plot_missingness( axes[1].set_xlabel(r"Sequence length", fontsize=7) axes[1].set_ylabel("Frequency", fontsize=7) axes[1].tick_params(axis="both", labelsize=7) - plt.show() + + logger.info( + "Plotting finished. Please invoke matplotlib.pyplot.show() to display the plot." + ) From 0d64600fff96e3e19c33590c1c12cc6e8d5d65e1 Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Mon, 26 Feb 2024 13:39:57 +0800 Subject: [PATCH 2/4] feat: update requirements and the setup file; --- environment-dev.yml | 27 +++++++++++++-------------- requirements.txt | 12 ++++++------ setup.py | 17 +++++++++++------ 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 11d3ba09..2b3bea45 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -7,21 +7,20 @@ channels: - nodefaults dependencies: - ## basic - #- conda-forge::python - #- conda-forge::pip - #- conda-forge::scipy - #- conda-forge::numpy - #- conda-forge::scikit-learn - #- conda-forge::pandas <2.0.0 - #- conda-forge::h5py - #- conda-forge::tensorboard - #- conda-forge::pygrinder >=0.4 - #- conda-forge::tsdb >=0.2 - #- conda-forge::matplotlib - #- pytorch::pytorch >=1.10.0 + # basic + - conda-forge::pip + - conda-forge::h5py + - conda-forge::numpy + - conda-forge::scipy + - conda-forge::python + - conda-forge::pandas + - conda-forge::matplotlib + - conda-forge::tensorboard + - conda-forge::scikit-learn + - conda-forge::pygrinder >=0.4 + - conda-forge::tsdb >=0.2 + - pytorch::pytorch >=1.10.0 ## Below we install the latest pypots because we need pypots-cli in it for development. - ## PyPOTS itself already includes all basic dependencies. - conda-forge::pypots # optional diff --git a/requirements.txt b/requirements.txt index 0523e1ba..13a82508 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ # This requirements.txt file only include the basic dependencies for PyPOTS. # Please refer to setup.cfg for more dependency details. +h5py numpy -scikit-learn -matplotlib scipy -torch>=1.10.0 +pandas +matplotlib tensorboard -pandas<2.0.0 -pygrinder>=0.4 +scikit-learn +torch>=1.10.0 tsdb>=0.2 -h5py +pygrinder>=0.4 diff --git a/setup.py b/setup.py index 4b42b34e..4630e69c 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ "Download": "https://github.com/WenjieDu/PyPOTS/archive/main.zip", }, keywords=[ + "data science", "data mining", "neural networks", "machine learning", @@ -31,6 +32,7 @@ "time-series analysis", "time series", "imputation", + "interpolation", "classification", "clustering", "forecasting", @@ -44,16 +46,16 @@ packages=find_packages(exclude=["tests"]), include_package_data=True, install_requires=[ + "h5py", "numpy", - "scikit-learn", - "matplotlib", "scipy", - "torch>=1.10.0", + "pandas", + "matplotlib", "tensorboard", - "pandas<2.0.0", - "pygrinder>=0.4", + "scikit-learn", + "torch>=1.10.0", "tsdb>=0.2", - "h5py", + "pygrinder>=0.4", ], python_requires=">=3.7.0", setup_requires=["setuptools>=38.6.0"], @@ -63,6 +65,7 @@ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", + "Intended Audience :: Healthcare Industry", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", @@ -70,6 +73,8 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries :: Application Frameworks", ], ) From 3ba359fb403f66de082f7f912fbf608001ddfae8 Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Fri, 8 Mar 2024 11:02:01 +0800 Subject: [PATCH 3/4] docs: update the installation page and README; --- README.md | 25 ++++++++++++------------- docs/install.rst | 12 ++++-------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 4186ce2e..54244dc1 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ X = X.reshape(num_samples, 48, -1) X_ori = X # keep X_ori for validation X = mcar(X, 0.1) # randomly hold out 10% observed values as ground truth dataset = {"X": X} # X for model input -print(X.shape) # (11988, 48, 37), 11988 samples, 48 time steps, 37 features +print(X.shape) # (11988, 48, 37), 11988 samples and each sample has 48 time steps, 37 features # Model training. This is PyPOTS showtime. saits = SAITS(n_steps=48, n_features=37, n_layers=2, d_model=256, d_inner=128, n_heads=4, d_k=64, d_v=64, dropout=0.1, epochs=10) @@ -213,6 +213,16 @@ This functionality is implemented with the [Microsoft NNI](https://github.com/mi ## ❖ Citing PyPOTS +> [!TIP] +> **[Updates in Feb 2024]** 😎 Our survey paper [Deep Learning for Multivariate Time Series Imputation: A Survey](https://arxiv.org/abs/2402.04059) has been released on arXiv. +The code is open source in the GitHub repo [Awesome_Imputation](https://github.com/WenjieDu/Awesome_Imputation). +We comprehensively review the literature of the state-of-the-art deep-learning imputation methods for time series, +provide a taxonomy for them, and discuss the challenges and future directions in this field. +> +> **[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](https://kdd-milets.github.io/milets2023/))). +**Additionally**, PyPOTS has been included as a [PyTorch Ecosystem](https://pytorch.org/ecosystem/) project. + The paper introducing PyPOTS is available on arXiv at [this URL](https://arxiv.org/abs/2305.18811), and we are pursuing to publish it in prestigious academic venues, e.g. JMLR (track for [Machine Learning Open Source Software](https://www.jmlr.org/mloss/)). If you use PyPOTS in your work, @@ -222,7 +232,7 @@ There are scientific research projects using PyPOTS and referencing in their pap Here is [an incomplete list of them](https://scholar.google.com/scholar?as_ylo=2022&q=%E2%80%9CPyPOTS%E2%80%9D&hl=en>). ``` bibtex -@article{du2023PyPOTS, +@article{du2023pypots, title={{PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series}}, author={Wenjie Du}, year={2023}, @@ -239,17 +249,6 @@ doi={10.48550/arXiv.2305.18811}, > arXiv, abs/2305.18811.https://arxiv.org/abs/2305.18811 -> [!TIP] -> **[Updates in Feb 2024]** 😎 Our survey paper [Deep Learning for Multivariate Time Series Imputation: A Survey](https://arxiv.org/abs/2402.04059) has been released on arXiv. -The code is open source in the GitHub repo [Awesome_Imputation](https://github.com/WenjieDu/Awesome_Imputation). -We comprehensively review the literature of the state-of-the-art deep-learning imputation methods for time series, -provide a taxonomy for them, and discuss the challenges and future directions in this field. -> -> **[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](https://kdd-milets.github.io/milets2023/))). -Besides, PyPOTS has been included as a [PyTorch Ecosystem](https://pytorch.org/ecosystem/) project. - - ## ❖ Contribution You're very welcome to contribute to this exciting project! diff --git a/docs/install.rst b/docs/install.rst index b3aa7db9..7c1ad5c0 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -26,13 +26,14 @@ Alternatively, you can install from the latest source code which may be not offi Required Dependencies """"""""""""""""""""" * Python >=3.7 +* h5py * numpy * scipy +* pandas +* matplotlib +* tensorboard * scikit-learn -* pandas <2.0.0 * torch >=1.10.0 -* tensorboard -* h5py * tsdb >=0.2 * pygrinder >=0.2 @@ -56,11 +57,6 @@ In addition, note that Python v.3.7 has also been in the end-of-life status sinc Hence, we will raise the minimum support Python version to v3.8 in the future. Please use Python v3.8 or above if possible also for the security of your development environment. -* **Why we need pandas <2.0.0?** - -Because v2 may cause ``ModuleNotFoundError: No module named 'pandas.core.indexes.numeric'``, -see https://stackoverflow.com/questions/75953279/modulenotfounderror-no-module-named-pandas-core-indexes-numeric-using-metaflo. - * **Why we need PyTorch >=1.10?** Because of pytorch_sparse, please refer to https://github.com/rusty1s/pytorch_sparse/issues/207#issuecomment-1065549338. From ecb5ca0b04db3f7b072f64264f2e4b70dc80adb2 Mon Sep 17 00:00:00 2001 From: Wenjie Du Date: Mon, 11 Mar 2024 23:27:41 +0800 Subject: [PATCH 4/4] docs: add the graph of PyPOTS ecosystem pipeline into README; --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 54244dc1..361123c4 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,13 @@ Considering the future workload, PyPOTS tutorials are released in a single repo, and you can find them in [BrewPOTS](https://github.com/WenjieDu/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! +

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

## ❖ Installation