Skip to content

Commit

Permalink
docs: update the docs of pypots.nn package;
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed Apr 13, 2024
1 parent ddbc50f commit 0d7c493
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Additionally, we present you a usage example of imputing missing values in time
❖ 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 all listed `on the reference page </references.html>`_.
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 <https://github.com/microsoft/nni>`_ framework.
Expand All @@ -183,7 +183,7 @@ the same as we did in `SAITS paper <https://arxiv.org/pdf/2202.08516)>`_.
Task Type Algorithm Year Reference
============================== ================ ========================================================================================================= ====== =========
Imputation Neural Net SAITS (Self-Attention-based Imputation for Time Series) 2023 :cite:`du2023SAITS`
Imputation Neural Net Transformer 2017 :cite:`vaswani2017Transformer`, :cite:`du2023SAITS`
Imputation Neural Net Transformer 2017 :cite:`vaswani2017Transformer`
Imputation Neural Net Crossformer (Transformer Utilizing Cross-Dimension Dependency for Multivariate Time Series Forecasting) 2023 :cite:`nie2023patchtst`
Imputation Neural Net TimesNet (Temporal 2D-Variation Modeling for General Time Series Analysis) 2023 :cite:`wu2023timesnet`
Imputation Neural Net PatchTST (A Time Series is Worth 64 Words: Long-Term Forecasting with Transformers) 2023 :cite:`nie2023patchtst`
Expand Down
126 changes: 123 additions & 3 deletions docs/pypots.nn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,134 @@ pypots.nn.functional
:members:


pypots.nn.modules.rnn
---------------------
pypots.nn.modules.autoformer
-----------------------------

.. automodule:: pypots.nn.modules.autoformer
:members:


pypots.nn.modules.brits
-----------------------------

.. automodule:: pypots.nn.modules.brits
:members:


pypots.nn.modules.crli
-----------------------------

.. automodule:: pypots.nn.modules.crli
:members:


pypots.nn.modules.crossformer
-----------------------------

.. automodule:: pypots.nn.modules.crossformer
:members:


pypots.nn.modules.csdi
-----------------------------

.. automodule:: pypots.nn.modules.csdi
:members:


pypots.nn.modules.dlinear
-----------------------------

.. automodule:: pypots.nn.modules.dlinear
:members:


pypots.nn.modules.etsformer
-----------------------------

.. automodule:: pypots.nn.modules.etsformer
:members:

.. automodule:: pypots.nn.modules.rnn

pypots.nn.modules.fedformer
-----------------------------

.. automodule:: pypots.nn.modules.fedformer
:members:


pypots.nn.modules.gpvae
-----------------------------

.. automodule:: pypots.nn.modules.gpvae
:members:


pypots.nn.modules.grud
-----------------------------

.. automodule:: pypots.nn.modules.grud
:members:


pypots.nn.modules.informer
-----------------------------

.. automodule:: pypots.nn.modules.informer
:members:


pypots.nn.modules.mrnn
-----------------------------

.. automodule:: pypots.nn.modules.mrnn
:members:


pypots.nn.modules.patchtst
-----------------------------

.. automodule:: pypots.nn.modules.patchtst
:members:


pypots.nn.modules.raindrop
-----------------------------

.. automodule:: pypots.nn.modules.raindrop
:members:


pypots.nn.modules.saits
-----------------------------

.. automodule:: pypots.nn.modules.saits
:members:


pypots.nn.modules.timesnet
-----------------------------

.. automodule:: pypots.nn.modules.timesnet
:members:


pypots.nn.modules.transformer
-----------------------------

.. automodule:: pypots.nn.modules.transformer
:members:


pypots.nn.modules.usgan
-----------------------------

.. automodule:: pypots.nn.modules.usgan
:members:


pypots.nn.modules.vader
-----------------------------

.. automodule:: pypots.nn.modules.vader
:members:
2 changes: 2 additions & 0 deletions pypots/imputation/transformer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def __init__(
attn_dropout,
)
self.output_projection = nn.Linear(d_model, n_features)

# apply SAITS loss function to Transformer on the imputation task
self.saits_loss_func = SaitsLoss(ORT_weight, MIT_weight)

def forward(self, inputs: dict, training: bool = True) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion pypots/nn/modules/autoformer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The package of the partially-observed time-series imputation model Autoformer.
The package including the modules of Autoformer.
Refer to the paper
`Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long.
Expand Down
2 changes: 1 addition & 1 deletion pypots/nn/modules/brits/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The package of the partially-observed time-series imputation model BRITS.
The package including the modules of BRITS.
Refer to the paper
`Wei Cao, Dong Wang, Jian Li, Hao Zhou, Lei Li, and Yitan Li.
Expand Down
2 changes: 1 addition & 1 deletion pypots/nn/modules/etsformer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The package of the partially-observed time-series imputation model ETSformer.
The package including the modules of ETSformer.
Refer to the paper
`Gerald Woo, Chenghao Liu, Doyen Sahoo, Akshat Kumar, and Steven Hoi.
Expand Down
2 changes: 2 additions & 0 deletions pypots/nn/modules/grud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""
The package including the modules of GRU-D.
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."
"""
Expand Down
7 changes: 7 additions & 0 deletions pypots/nn/modules/saits/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
"""
The package including the modules of SAITS.
Refer to the paper
`Wenjie Du, David Cote, and Yan Liu.
SAITS: Self-Attention-based Imputation for Time Series.
Expert Systems with Applications, 219:119619, 2023.
<https://arxiv.org/pdf/2202.08516>`_
"""

Expand Down
2 changes: 1 addition & 1 deletion pypots/nn/modules/usgan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

# Created by Jun Wang <jwangfx@connect.ust.hk>
# Created by Jun Wang <jwangfx@connect.ust.hk> and Wenjie Du <wenjay.du@gmail.com>
# License: BSD-3-Clause

from .backbone import BackboneUSGAN
Expand Down

0 comments on commit 0d7c493

Please sign in to comment.