pypots.nn

pypots.nn.functional

pypots.nn.functional.gather_listed_dicts(dict_list)[source]

Gather batched dict output from model forward

Parameters:

dict_list (list) – A list of dict output from model forward. Each dict should have the same keys.

Returns:

A dict with the same keys as the input dict, but with values concatenated along the batch dimension.

Return type:

gathered_dict

pypots.nn.functional.nonstationary_norm(X, missing_mask=None)[source]

Normalization from Non-stationary Transformer. Please refer to [30] for more details.

Parameters:
  • X (torch.Tensor) – Input data to be normalized. Shape: (n_samples, n_steps (seq_len), n_features).

  • missing_mask (torch.Tensor, optional) – Missing mask has the same shape as X. 1 indicates observed and 0 indicates missing.

Return type:

Tuple[Tensor, Tensor, Tensor]

Returns:

  • X_enc (torch.Tensor) – Normalized data. Shape: (n_samples, n_steps (seq_len), n_features).

  • means (torch.Tensor) – Means values for de-normalization. Shape: (n_samples, n_features) or (n_samples, 1, n_features).

  • stdev (torch.Tensor) – Standard deviation values for de-normalization. Shape: (n_samples, n_features) or (n_samples, 1, n_features).

pypots.nn.functional.nonstationary_denorm(X, means, stdev)[source]

De-Normalization from Non-stationary Transformer. Please refer to [30] for more details.

Parameters:
  • X (torch.Tensor) – Input data to be de-normalized. Shape: (n_samples, n_steps (seq_len), n_features).

  • means (torch.Tensor) – Means values for de-normalization . Shape: (n_samples, n_features) or (n_samples, 1, n_features).

  • stdev (torch.Tensor) – Standard deviation values for de-normalization. Shape: (n_samples, n_features) or (n_samples, 1, n_features).

Returns:

X_denorm – De-normalized data. Shape: (n_samples, n_steps (seq_len), n_features).

Return type:

torch.Tensor

pypots.nn.functional.calc_mae(predictions, targets, masks=None)[source]

Calculate the Mean Absolute Error between predictions and targets. masks can be used for filtering. For values==0 in masks, values at their corresponding positions in predictions will be ignored.

Parameters:
  • predictions (Union[ndarray, Tensor]) – The prediction data to be evaluated.

  • targets (Union[ndarray, Tensor]) – The target data for helping evaluate the predictions.

  • masks (Union[ndarray, Tensor, None]) – The masks for filtering the specific values in inputs and target from evaluation. When given, only values at corresponding positions where values ==1 in masks will be used for evaluation.

Return type:

Union[float, Tensor]

Examples

>>> import numpy as np
>>> from pypots.nn.functional import calc_mae
>>> targets = np.array([1, 2, 3, 4, 5])
>>> predictions = np.array([1, 2, 1, 4, 6])
>>> mae = calc_mae(predictions, targets)

mae = 0.6 here, the error is from the 3rd and 5th elements and is |3-1|+|5-6|=3, so the result is 3/5=0.6.

If we want to prevent some values from MAE calculation, e.g. the first three elements here, we can use masks to filter out them:

>>> masks = np.array([0, 0, 0, 1, 1])
>>> mae = calc_mae(predictions, targets, masks)

mae = 0.5 here, the first three elements are ignored, the error is from the 5th element and is |5-6|=1, so the result is 1/2=0.5.

pypots.nn.functional.calc_mse(predictions, targets, masks=None)[source]

Calculate the Mean Square Error between predictions and targets. masks can be used for filtering. For values==0 in masks, values at their corresponding positions in predictions will be ignored.

Parameters:
  • predictions (Union[ndarray, Tensor]) – The prediction data to be evaluated.

  • targets (Union[ndarray, Tensor]) – The target data for helping evaluate the predictions.

  • masks (Union[ndarray, Tensor, None]) – The masks for filtering the specific values in inputs and target from evaluation. When given, only values at corresponding positions where values ==1 in masks will be used for evaluation.

Return type:

Union[float, Tensor]

Examples

>>> import numpy as np
>>> from pypots.nn.functional import calc_mse
>>> targets = np.array([1, 2, 3, 4, 5])
>>> predictions = np.array([1, 2, 1, 4, 6])
>>> mse = calc_mse(predictions, targets)

mse = 1 here, the error is from the 3rd and 5th elements and is |3-1|^2+|5-6|^2=5, so the result is 5/5=1.

If we want to prevent some values from MSE calculation, e.g. the first three elements here, we can use masks to filter out them:

>>> masks = np.array([0, 0, 0, 1, 1])
>>> mse = calc_mse(predictions, targets, masks)

mse = 0.5 here, the first three elements are ignored, the error is from the 5th element and is |5-6|^2=1, so the result is 1/2=0.5.

pypots.nn.functional.calc_rmse(predictions, targets, masks=None)[source]

Calculate the Root Mean Square Error between predictions and targets. masks can be used for filtering. For values==0 in masks, values at their corresponding positions in predictions will be ignored.

Parameters:
  • predictions (Union[ndarray, Tensor]) – The prediction data to be evaluated.

  • targets (Union[ndarray, Tensor]) – The target data for helping evaluate the predictions.

  • masks (Union[ndarray, Tensor, None]) – The masks for filtering the specific values in inputs and target from evaluation. When given, only values at corresponding positions where values ==1 in masks will be used for evaluation.

Return type:

Union[float, Tensor]

Examples

>>> import numpy as np
>>> from pypots.nn.functional import calc_rmse
>>> targets = np.array([1, 2, 3, 4, 5])
>>> predictions = np.array([1, 2, 1, 4, 6])
>>> rmse = calc_rmse(predictions, targets)

rmse = 1 here, the error is from the 3rd and 5th elements and is |3-1|^2+|5-6|^2=5, so the result is \sqrt{5/5}=1.

If we want to prevent some values from RMSE calculation, e.g. the first three elements here, we can use masks to filter out them:

>>> masks = np.array([0, 0, 0, 1, 1])
>>> rmse = calc_rmse(predictions, targets, masks)

rmse = 0.707 here, the first three elements are ignored, the error is from the 5th element and is |5-6|^2=1, so the result is \sqrt{1/2}=0.5.

pypots.nn.functional.calc_mre(predictions, targets, masks=None)[source]

Calculate the Mean Relative Error between predictions and targets. masks can be used for filtering. For values==0 in masks, values at their corresponding positions in predictions will be ignored.

Parameters:
  • predictions (Union[ndarray, Tensor]) – The prediction data to be evaluated.

  • targets (Union[ndarray, Tensor]) – The target data for helping evaluate the predictions.

  • masks (Union[ndarray, Tensor, None]) – The masks for filtering the specific values in inputs and target from evaluation. When given, only values at corresponding positions where values ==1 in masks will be used for evaluation.

Return type:

Union[float, Tensor]

Examples

>>> import numpy as np
>>> from pypots.nn.functional import calc_mre
>>> targets = np.array([1, 2, 3, 4, 5])
>>> predictions = np.array([1, 2, 1, 4, 6])
>>> mre = calc_mre(predictions, targets)

mre = 0.2 here, the error is from the 3rd and 5th elements and is |3-1|+|5-6|=3, so the result is \sqrt{3/(1+2+3+4+5)}=1.

If we want to prevent some values from MRE calculation, e.g. the first three elements here, we can use masks to filter out them:

>>> masks = np.array([0, 0, 0, 1, 1])
>>> mre = calc_mre(predictions, targets, masks)

mre = 0.111 here, the first three elements are ignored, the error is from the 5th element and is |5-6|^2=1, so the result is \sqrt{1/2}=0.5.

pypots.nn.functional.calc_quantile_crps(predictions, targets, masks, scaler_mean=0, scaler_stddev=1)[source]

Continuous rank probability score for distributional predictions.

Parameters:
  • predictions (Union[ndarray, Tensor]) – The prediction data to be evaluated.

  • targets (Union[ndarray, Tensor]) – The target data for helping evaluate the predictions.

  • masks (Union[ndarray, Tensor]) – The masks for filtering the specific values in inputs and target from evaluation. Only values at corresponding positions where values ==1 in masks will be used for evaluation.

  • scaler_mean – Mean value of the scaler used to scale the data.

  • scaler_stddev – Standard deviation value of the scaler used to scale the data.

Returns:

Value of continuous rank probability score.

Return type:

CRPS

pypots.nn.functional.calc_quantile_crps_sum(predictions, targets, masks, scaler_mean=0, scaler_stddev=1)[source]

Sum continuous rank probability score for distributional predictions.

Parameters:
  • predictions (Union[ndarray, Tensor]) – The prediction data to be evaluated.

  • targets (Union[ndarray, Tensor]) – The target data for helping evaluate the predictions.

  • masks (Union[ndarray, Tensor]) – The masks for filtering the specific values in inputs and target from evaluation. Only values at corresponding positions where values ==1 in masks will be used for evaluation.

  • scaler_mean – Mean value of the scaler used to scale the data.

  • scaler_stddev – Standard deviation value of the scaler used to scale the data.

Returns:

Sum value of continuous rank probability score.

Return type:

CRPS

pypots.nn.functional.calc_binary_classification_metrics(prob_predictions, targets, pos_label=1)[source]

Calculate the evaluation metrics for the binary classification task, including accuracy, precision, recall, f1 score, area under ROC curve, and area under Precision-Recall curve. If targets contains multiple categories, please set the positive category as pos_label.

Parameters:
  • prob_predictions (ndarray) – Estimated probability predictions returned by a decision function.

  • targets (ndarray) – Ground truth (correct) classification results.

  • pos_label (int) – The label of the positive class. Note that pos_label is also the index used to extract binary prediction probabilities from predictions.

Returns:

A dictionary contains classification metrics and useful results:

predictions: binary categories of the prediction results;

accuracy: prediction accuracy;

precision: prediction precision;

recall: prediction recall;

f1: F1-score;

precisions: precision values of Precision-Recall curve

recalls: recall values of Precision-Recall curve

pr_auc: area under Precision-Recall curve

fprs: false positive rates of ROC curve

tprs: true positive rates of ROC curve

roc_auc: area under ROC curve

Return type:

classification_metrics

pypots.nn.functional.calc_precision_recall_f1(prob_predictions, targets, pos_label=1)[source]

Calculate precision, recall, and F1-score of model predictions.

Parameters:
  • prob_predictions (ndarray) – Estimated probability predictions returned by a decision function.

  • targets (ndarray) – Ground truth (correct) classification results.

  • pos_label (int, default=1) – The label of the positive class.

Return type:

Tuple[float, float, float]

Returns:

  • precision – The precision value of model predictions.

  • recall – The recall value of model predictions.

  • f1 – The F1 score of model predictions.

pypots.nn.functional.calc_pr_auc(prob_predictions, targets, pos_label=1)[source]

Calculate precisions, recalls, and area under PR curve of model predictions.

Parameters:
  • prob_predictions (ndarray) – Estimated probability predictions returned by a decision function.

  • targets (ndarray) – Ground truth (correct) classification results.

  • pos_label (int, default=1) – The label of the positive class.

Return type:

Tuple[float, ndarray, ndarray, ndarray]

Returns:

  • pr_auc – Value of area under Precision-Recall curve.

  • precisions – Precision values of Precision-Recall curve.

  • recalls – Recall values of Precision-Recall curve.

  • thresholds – Increasing thresholds on the decision function used to compute precision and recall.

pypots.nn.functional.calc_roc_auc(prob_predictions, targets, pos_label=1)[source]

Calculate false positive rates, true positive rates, and area under AUC curve of model predictions.

Parameters:
  • prob_predictions (ndarray) – Estimated probabilities/predictions returned by a decision function.

  • targets (ndarray) – Ground truth (correct) classification results.

  • pos_label (int, default=1) – The label of the positive class.

Return type:

Tuple[float, ndarray, ndarray, ndarray]

Returns:

  • roc_auc – The area under ROC curve.

  • fprs – False positive rates of ROC curve.

  • tprs – True positive rates of ROC curve.

  • thresholds – Increasing thresholds on the decision function used to compute FPR and TPR.

pypots.nn.functional.calc_acc(class_predictions, targets)[source]

Calculate accuracy score of model predictions.

Parameters:
  • class_predictions (ndarray) – Estimated classification predictions returned by a classifier.

  • targets (ndarray) – Ground truth (correct) classification results.

Returns:

The accuracy of model predictions.

Return type:

acc_score

pypots.nn.functional.calc_rand_index(class_predictions, targets)[source]

Calculate Rand Index, a measure of the similarity between two data clusterings. Refer to [54].

Parameters:
  • class_predictions (ndarray) – Clustering results returned by a clusterer.

  • targets (ndarray) – Ground truth (correct) clustering results.

Returns:

Rand index.

Return type:

RI

References

pypots.nn.functional.calc_adjusted_rand_index(class_predictions, targets)[source]

Calculate adjusted Rand Index.

Parameters:
  • class_predictions (ndarray) – Clustering results returned by a clusterer.

  • targets (ndarray) – Ground truth (correct) clustering results.

Returns:

Adjusted Rand index.

Return type:

aRI

References

pypots.nn.functional.calc_cluster_purity(class_predictions, targets)[source]

Calculate cluster purity.

Parameters:
  • class_predictions (ndarray) – Clustering results returned by a clusterer.

  • targets (ndarray) – Ground truth (correct) clustering results.

Returns:

cluster purity.

Return type:

cluster_purity

Notes

This function is from the answer https://stackoverflow.com/a/51672699 on StackOverflow.

pypots.nn.functional.calc_nmi(class_predictions, targets)[source]

Calculate Normalized Mutual Information between two clusterings.

Parameters:
  • class_predictions (ndarray) – Clustering results returned by a clusterer.

  • targets (ndarray) – Ground truth (correct) clustering results.

Returns:

NMI – Normalized Mutual Information

Return type:

float,

pypots.nn.functional.calc_chs(X, predicted_labels)[source]

Compute the Calinski and Harabasz score (also known as the Variance Ratio Criterion).

Xarray-like of shape (n_samples_a, n_features)

A feature array, or learned latent representation, that can be used for clustering.

predicted_labelsarray-like of shape (n_samples)

Predicted labels for each sample.

Returns:

calinski_harabasz_score – The resulting Calinski-Harabasz score. In short, the higher, the better.

Return type:

float

References

pypots.nn.functional.calc_dbs(X, predicted_labels)[source]

Compute the Davies-Bouldin score.

Parameters:
  • X (array-like of shape (n_samples_a, n_features)) – A feature array, or learned latent representation, that can be used for clustering.

  • predicted_labels (array-like of shape (n_samples)) – Predicted labels for each sample.

Returns:

davies_bouldin_score – The resulting Davies-Bouldin score. In short, the lower, the better.

Return type:

float

References

pypots.nn.functional.calc_silhouette(X, predicted_labels)[source]

Compute the mean Silhouette Coefficient of all samples.

Parameters:
  • X (array-like of shape (n_samples_a, n_features)) – A feature array, or learned latent representation, that can be used for clustering.

  • predicted_labels (array-like of shape (n_samples)) – Predicted labels for each sample.

Returns:

silhouette_score – Mean Silhouette Coefficient for all samples. In short, the higher, the better.

Return type:

float

References

pypots.nn.functional.calc_internal_cluster_validation_metrics(X, predicted_labels)[source]

Computer all internal cluster validation metrics available in PyPOTS and return as a dictionary.

Parameters:
  • X (array-like of shape (n_samples_a, n_features)) – A feature array, or learned latent representation, that can be used for clustering.

  • predicted_labels (array-like of shape (n_samples)) – Predicted labels for each sample.

Returns:

internal_cluster_validation_metrics – A dictionary contains all internal cluster validation metrics available in PyPOTS.

Return type:

dict

pypots.nn.functional.calc_external_cluster_validation_metrics(class_predictions, targets)[source]

Computer all external cluster validation metrics available in PyPOTS and return as a dictionary.

Parameters:
  • class_predictions (ndarray) – Clustering results returned by a clusterer.

  • targets (ndarray) – Ground truth (correct) clustering results.

Returns:

external_cluster_validation_metrics – A dictionary contains all external cluster validation metrics available in PyPOTS.

Return type:

dict

pypots.nn.modules.revin

The package including the modules of RevIN.

Refer to the paper Taesung Kim, Jinhee Kim, Yunwon Tae, Cheonbok Park, Jang-Ho Choi, and Jaegul Choo. “Reversible Instance Normalization for Accurate Time-Series Forecasting against Distribution Shift”. In International Conference on Learning Representations, 2022.

Notes

This implementation is inspired by the official one https://github.com/ts-kim/RevIN

members:

pypots.nn.modules.tcn

The package including the modules of TCN (Temporal Convolutional Network).

Refer to the paper Shaojie Bai, J. Zico Kolter, and Vladlen Koltun. “An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling”. arXiv preprint arXiv:1803.01271.

Notes

This implementation is inspired by the official one https://github.com/locuslab/TCN

members:

pypots.nn.modules.pyraformer

The package including the modules of Pyraformer.

Refer to the paper Shizhan Liu, Hang Yu, Cong Liao, Jianguo Li, Weiyao Lin, Alex X. Liu, and Schahram Dustdar. “Pyraformer: Low-Complexity Pyramidal Attention for Long-Range Time Series Modeling and Forecasting”. International Conference on Learning Representations. 2022.

Notes

This implementation is inspired by the official one https://github.com/ant-research/Pyraformer

members:

pypots.nn.modules.film

The package including the modules of FiLM.

Refer to the paper Zhou, Tian, Ziqing Ma, Qingsong Wen, Liang Sun, Tao Yao, Wotao Yin, and Rong Jin. “Film: Frequency improved legendre memory model for long-term time series forecasting.” In Advances in Neural Information Processing Systems 35 (2022): 12677-12690.

Notes

This implementation is inspired by the official one https://github.com/tianzhou2011/FiLM

members:

pypots.nn.modules.raindrop

The package including the modules of Raindrop.

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.

Notes

This implementation is inspired by the official one the official implementation https://github.com/mims-harvard/Raindrop

members:

pypots.nn.modules.frets

The package including the modules of FiLM.

Refer to the paper Kun Yi, Qi Zhang, Wei Fan, Shoujin Wang, Pengyang Wang, Hui He, Ning An, Defu Lian, Longbing Cao, and Zhendong Niu. “Frequency-domain MLPs are More Effective Learners in Time Series Forecasting.” Advances in Neural Information Processing Systems 36 (2024).

Notes

This implementation is inspired by the official one https://github.com/aikunyi/FreTS

members:

pypots.nn.modules.timesnet

The package including the modules of TimesNet.

Refer to the paper Haixu Wu, Tengge Hu, Yong Liu, Hang Zhou, Jianmin Wang, and Mingsheng Long. TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis. In ICLR, 2023.

Notes

This implementation is inspired by the official one https://github.com/thuml/Time-Series-Library

members:

pypots.nn.modules.moment

The package including the modules of MOMENT.

Refer to the paper Mononito Goswami, Konrad Szafer, Arjun Choudhry, Yifu Cai, Shuo Li, and Artur Dubrawski. “MOMENT: A Family of Open Time-series Foundation Models”. In ICML, 2024.

Notes

This implementation is inspired by the official one https://github.com/moment-timeseries-foundation-model/moment-research

members:

pypots.nn.modules.inception

The package including the modules of Inception model.

Refer to the paper Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, Andrew Rabinovich. Going deeper with convolutions. CVPR 2015.

members:

pypots.nn.modules.segrnn

The package including the modules of SegRNN.

Refer to the paper Lin, Shengsheng and Lin, Weiwei and Wu, Wentai and Zhao, Feiyu and Mo, Ruichao and Zhang, Haotong. Segrnn: Segment recurrent neural network for long-term time series forecasting. arXiv preprint arXiv:2308.11200.

Notes

This implementation is inspired by the official one https://github.com/lss-1138/SegRNN

members:

pypots.nn.modules.stemgnn

The package including the modules of StemGNN.

Refer to the paper Defu Cao, Yujing Wang, Juanyong Duan, Ce Zhang, Xia Zhu, Congrui Huang, Yunhai Tong, Bixiong Xu, Jing Bai, Jie Tong, Qi Zhang. “Spectral Temporal Graph Neural Network for Multivariate Time-series Forecasting”. In Advances in Neural Information Processing Systems, 2020.

Notes

This implementation is inspired by the official one https://github.com/microsoft/StemGNN

members:

pypots.nn.modules.timellm

The package including the modules of Time-LLM.

Refer to the paper Ming Jin, Shiyu Wang, Lintao Ma, Zhixuan Chu, James Y. Zhang, Xiaoming Shi, Pin-Yu Chen, Yuxuan Liang, Yuan-Fang Li, Shirui Pan, and Qingsong Wen. Time-LLM: Time Series Forecasting by Reprogramming Large Language Models. In the 12th International Conference on Learning Representations, 2024.

Notes

This implementation is inspired by the official one https://github.com/KimMeen/Time-LLM

members:

pypots.nn.modules.imputeformer

The package including the modules of ImputeFormer.

Refer to the paper Tong Nie, Guoyang Qin, Wei Ma, Yuewen Mei, Jian Sun. ImputeFormer: Low Rankness-Induced Transformers for Generalizable Spatiotemporal Imputation. KDD, 2024.

Notes

This implementation is inspired by the official one https://github.com/tongnie/ImputeFormer

members:

pypots.nn.modules.csai

The package including the modules of CSAI.

Refer to the paper Linglong Qian, Zina Ibrahim, Hugh Logan Ellis, Ao Zhang, Yuezhou Zhang, Tao Wang, Richard Dobson. Knowledge Enhanced Conditional Imputation for Healthcare Time-series. In Arxiv, 2024.

Notes

This implementation is inspired by the official one the official implementation https://github.com/LinglongQian/CSAI.

members:

pypots.nn.modules.transformer

The package including the modules of Transformer.

Refer to the papers Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. and Wenjie Du, David Cote, and Yan Liu. SAITS: Self-Attention-based Imputation for Time Series. Expert Systems with Applications, 219:119619, 2023.

Notes

This implementation is inspired by https://github.com/WenjieDu/SAITS

members:

pypots.nn.modules.mrnn

The package including the modules of M-RNN.

Refer to the paper Jinsung Yoon, William R. Zame, and Mihaela van der Schaar. Estimating missing data in temporal data streams using multi-directional recurrent neural networks. IEEE Transactions on Biomedical Engineering, 66(5):14771490, 2019.

Notes

This implementation is inspired by the official one https://github.com/jsyoon0823/MRNN and https://github.com/WenjieDu/SAITS

members:

pypots.nn.modules.reformer

The package including the modules of Reformer.

Refer to the paper Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. “Reformer: The Efficient Transformer”. In International Conference on Learning Representations, 2020.

Notes

This implementation is inspired by the official one https://github.com/google/trax/tree/master/trax/models/reformer and https://github.com/lucidrains/reformer-pytorch

members:

pypots.nn.modules.micn

The package including the modules of MICN.

Refer to the paper Huiqiang Wang, Jian Peng, Feihu Huang, Jince Wang, Junhui Chen, and Yifei Xiao “MICN: Multi-scale Local and Global Context Modeling for Long-term Series Forecasting”. In the Eleventh International Conference on Learning Representations, 2023.

Notes

This implementation is inspired by the official one https://github.com/wanghq21/MICN

members:

pypots.nn.modules.trmf

members:

pypots.nn.modules.tefn

The package of the forecasting model TEFN.

Refer to the paper Tianxiang Zhan, Yuanpeng He, Yong Deng, and Zhen Li. Time Evidence Fusion Network: Multi-source View in Long-Term Time Series Forecasting. In Arxiv, 2024.

Notes

This implementation is transfered from the official one https://github.com/ztxtech/Time-Evidence-Fusion-Network

members:

pypots.nn.modules.informer

The package including the modules of Informer.

Refer to the paper Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianxin Li, Hui Xiong, and Wancai Zhang. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 11106–11115, 2021.

Notes

This implementation is inspired by the official one https://github.com/zhouhaoyi/Informer2020

members:

pypots.nn.modules.dlinear

The package including the modules of DLinear.

Refer to the paper Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. Are transformers effective for time series forecasting? In AAAI, volume 37, pages 11121–11128, Jun. 2023.

Notes

This implementation is inspired by the official one https://github.com/cure-lab/LTSF-Linear

members:

pypots.nn.modules.etsformer

The package including the modules of ETSformer.

Refer to the paper Gerald Woo, Chenghao Liu, Doyen Sahoo, Akshat Kumar, and Steven Hoi. ETSformer: Exponential smoothing transformers for time-series forecasting. In ICLR, 2023.

Notes

This implementation is inspired by the official one https://github.com/salesforce/ETSformer

members:

pypots.nn.modules.fits

The package including the modules of FITS.

Refer to the paper Zhijian Xu, Ailing Zeng, and Qiang Xu. FITS: Modeling Time Series with 10k parameters. In The Twelfth International Conference on Learning Representations, 2024.

Notes

This implementation is inspired by the official one https://github.com/VEWOXIC/FITS

members:

pypots.nn.modules.autoformer

The package including the modules of Autoformer.

Refer to the paper Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. Autoformer: Decomposition transformers with autocorrelation for long-term series forecasting. In Advances in Neural Information Processing Systems, volume 34, pages 22419–22430. Curran Associates, Inc., 2021.

Notes

This implementation is inspired by the official one https://github.com/thuml/Autoformer

members:

pypots.nn.modules.scinet

The package including the modules of SCINet.

Refer to the paper Minhao LIU, Ailing Zeng, Muxi Chen, Zhijian Xu, Qiuxia LAI, Lingna Ma, and Qiang Xu. “SCINet: Time Series Modeling and Forecasting with Sample Convolution and Interaction”. In Advances in Neural Information Processing Systems, 2022.

Notes

This implementation is inspired by the official one https://github.com/cure-lab/SCINet

members:

pypots.nn.modules.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. BRITS: Bidirectional recurrent imputation for time series. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.

Notes

This implementation is inspired by the official one https://github.com/caow13/BRITS The bugs in the original implementation are fixed here.

members:

pypots.nn.modules.koopa

The package including the modules of Koopa.

Refer to the paper Yong Liu, Chenyu Li, Jianmin Wang, and Mingsheng Long. “Koopa: Learning Non-stationary Time Series Dynamics with Koopman Predictors”. Advances in Neural Information Processing Systems 36 (2023).

Notes

This implementation is inspired by the official one https://github.com/thuml/Koopa

members:

pypots.nn.modules.tide

The package including the modules of TiDE.

Refer to the paper Abhimanyu Das, Weihao Kong, Andrew Leach, Shaan Mathur, Rajat Sen, and Rose Yu. “Long-term Forecasting with TiDE: Time-series Dense Encoder”. In Transactions on Machine Learning Research, 2023.

Notes

This implementation is inspired by the official one https://github.com/google-research/google-research/blob/master/tide and https://github.com/lich99/TiDE

members:

pypots.nn.modules.vader

The package including the modules of VaDER.

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.

Notes

This implementation is inspired by the official one https://github.com/johanndejong/VaDER

members:

pypots.nn.modules.patchtst

The package including the modules of PatchTST.

Refer to the paper Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. A time series is worth 64 words: Long-term forecasting with transformers. In ICLR, 2023.

Notes

This implementation is inspired by the official one https://github.com/yuqinie98/PatchTST

members:

pypots.nn.modules.timemixer

The package including the modules of TimeMixer.

Refer to the paper Shiyu Wang, Haixu Wu, Xiaoming Shi, Tengge Hu, Huakun Luo, Lintao Ma, James Y. Zhang, and Jun Zhou. “TimeMixer: Decomposable Multiscale Mixing for Time Series Forecasting”. In ICLR 2024.

Notes

This implementation is inspired by the official one https://github.com/kwuking/TimeMixer

members:

pypots.nn.modules.gpt4ts

The package including the modules of GPT4TS.

Refer to the paper Tian Zhou, Peisong Niu, Xue Wang, Liang Sun, Rong Jin. One Fits All: Power General Time Series Analysis by Pretrained LM. NeurIPS 2023.

Notes

This implementation is inspired by the official one https://github.com/DAMO-DI-ML/NeurIPS2023-One-Fits-All

members:

pypots.nn.modules.moderntcn

The package including the modules of ModernTCN.

Refer to the paper Donghao Luo, and Xue Wang. ModernTCN: A Modern Pure Convolution Structure for General Time Series Analysis. In The Twelfth International Conference on Learning Representations. 2024.

Notes

This implementation is inspired by the official one https://github.com/luodhhh/ModernTCN

members:

pypots.nn.modules.crossformer

The package including the modules of Crossformer.

Refer to the paper Yunhao Zhang and Junchi Yan. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In The 11th ICLR, 2023.

Notes

This implementation is inspired by the official one https://github.com/Thinklab-SJTU/Crossformer

members:

pypots.nn.modules.grud

The package including the modules of GRU-D.

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.

Notes

This implementation is inspired by the official one https://github.com/PeterChe1990/GRU-D

members:

pypots.nn.modules.saits

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.

Notes

This implementation is inspired by the official one https://github.com/WenjieDu/SAITS

members:

pypots.nn.modules.csdi

The package including the modules of CSDI.

Refer to the paper Yusuke Tashiro, Jiaming Song, Yang Song, and Stefano Ermon. CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation. In NeurIPS, 2021.

Notes

This implementation is inspired by the official one the official implementation https://github.com/ermongroup/CSDI.

members:

pypots.nn.modules.timemixerpp

The package including the modules of TimeMixer++.

Refer to the paper Shiyu Wang, Jiawei Li, Xiaoming Shi, Zhou Ye, Baichuan Mo, Wenze Lin, Ju Shengtong, Zhixuan Chu, Ming Jin. “TimeMixer++: A General Time Series Pattern Machine for Universal Predictive Analysis”. ICLR 2025.

Notes

This implementation is inspired by the official one https://anonymous.4open.science/r/TimeMixerPP

members:

pypots.nn.modules.gpvae

The package including the modules of GP-VAE.

Refer to the paper Vincent Fortuin, Dmitry Baranchuk, Gunnar Rätsch, and Stephan Mandt. GP-VAE: Deep probabilistic time series imputation. In International conference on artificial intelligence and statistics, pages 1651–1661. PMLR, 2020.

Notes

This implementation is inspired by the official one https://github.com/ratschlab/GP-VAE

members:

pypots.nn.modules.fedformer

The package including the modules of FEDformer.

Refer to the paper Tian Zhou, Ziqing Ma, Qingsong Wen, Xue Wang, Liang Sun, and Rong Jin. FEDformer: Frequency enhanced decomposed transformer for long-term series forecasting. In ICML, volume 162 of Proceedings of Machine Learning Research, pages 27268–27286. PMLR, 17–23 Jul 2022.

Notes

This implementation is inspired by the official one https://github.com/MAZiqing/FEDformer

members:

pypots.nn.modules.nonstationary_transformer

The package including the modules of Non-stationary Transformer.

Refer to the paper Yong Liu, Haixu Wu, Jianmin Wang, Mingsheng Long. Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting. Advances in Neural Information Processing Systems 35 (2022): 9881-9893.

Notes

This implementation is inspired by the official one https://github.com/thuml/Nonstationary_Transformers

members:

pypots.nn.modules.crli

The package including the modules of CRLI.

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.

Notes

This implementation is inspired by the official one https://github.com/qianlima-lab/CRLI

members:

pypots.nn.modules.ts2vec

The package including the modules of TS2Vec.

Refer to the paper Zhihan Yue, Yujing Wang, Juanyong Duan, Tianmeng Yang, Congrui Huang, Yunhai Tong, Bixiong Xu. “TS2Vec: Towards Universal Representation of Time Series”. In AAAI 2022.

Notes

This implementation is inspired by the official one https://github.com/zhihanyue/ts2vec

members:

pypots.nn.modules.totem

The package including the modules of TOTEM.

Refer to the paper Sabera J Talukder, Yisong Yue, and Georgia Gkioxari. TOTEM: TOkenized Time Series EMbeddings for General Time Series Analysis. In TMLR, 2024.

Notes

This implementation is inspired by the official one https://github.com/SaberaTalukder/TOTEM

members:

pypots.nn.modules.usgan

The package including the modules of USGAN.

Refer to the paper Xiaoye Miao, Yangyang Wu, Jun Wang, Yunjun Gao, Xudong Mao, and Jianwei Yin. Generative Semi-supervised Learning for Multivariate Time Series Imputation. In AAAI, 35(10):8983–8991, May 2021.

members: