Skip to content

Commit

Permalink
Merge pull request #449 from WenjieDu/dev
Browse files Browse the repository at this point in the history
Make classification GRUD more robust, and update docs
  • Loading branch information
WenjieDu committed Jun 26, 2024
2 parents ca30aab + f14b90b commit ac3318f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ And what else? Please read on ;-)
👈 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,
<i>Time Series Data Beans (TSDB)</i> is created to make loading time-series datasets super easy!
Visit [TSDB](https://github.com/WenjieDu/TSDB) right now to know more about this handy tool 🛠, and it now supports a total of 170 open-source datasets!
Visit [TSDB](https://github.com/WenjieDu/TSDB) right now to know more about this handy tool 🛠, and it now supports a total of 172 open-source datasets!

<a href="https://github.com/WenjieDu/PyGrinder">
<img src="https://pypots.com/figs/pypots_logos/PyGrinder/logo_FFBG.svg" align="right" width="140" alt="PyGrinder logo"/>
Expand Down
8 changes: 2 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ And what else? Please read on ;-)
👈 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 <https://github.com/WenjieDu/TSDB>`_ right now to know more about this handy tool 🛠, and it now supports a total of 170 open-source datasets!
Visit `TSDB <https://github.com/WenjieDu/TSDB>`_ right now to know more about this handy tool 🛠, and it now supports a total of 172 open-source datasets!

.. image:: https://pypots.com/figs/pypots_logos/PyGrinder/logo_FFBG.svg
:width: 150
Expand Down Expand Up @@ -298,12 +298,8 @@ please cite it as below and 🌟star `PyPOTS repository <https://github.com/Wenj
@article{du2023pypots,
title={{PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series}},
author={Wenjie Du},
journal={arXiv preprint arXiv:2305.18811},
year={2023},
eprint={2305.18811},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2305.18811},
doi={10.48550/arXiv.2305.18811},
}
or
Expand Down
2 changes: 2 additions & 0 deletions pypots/classification/grud/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def __init__(
self.empirical_mean = torch.sum(
self.missing_mask * self.X, dim=[0, 1]
) / torch.sum(self.missing_mask, dim=[0, 1])
# fill nan with 0, in case some features have no observations
self.empirical_mean = torch.nan_to_num(self.empirical_mean, 0)

def _fetch_data_from_array(self, idx: int) -> Iterable:
"""Fetch data according to index.
Expand Down

0 comments on commit ac3318f

Please sign in to comment.