Skip to content

Commit

Permalink
feat: add ncmapss (#49)
Browse files Browse the repository at this point in the history
* chore: add h5py dependency

* feat: add N-C-MAPSS reader

* fix: linting issues

* fix: add missing feature selection

* docs: add documentation
  • Loading branch information
tilman151 authored Jan 12, 2024
1 parent 44340f7 commit bd788f8
Show file tree
Hide file tree
Showing 8 changed files with 535 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
This library contains a collection of common benchmark datasets for **remaining useful lifetime (RUL)** estimation.
They are provided as [LightningDataModules](https://pytorch-lightning.readthedocs.io/en/stable/api/pytorch_lightning.core.LightningDataModule.html#pytorch_lightning.core.LightningDataModule) to be readily used in [PyTorch Lightning](https://pytorch-lightning.readthedocs.io/en/latest/).

Currently, four datasets are supported:
Currently, five datasets are supported:

* **C-MAPSS** Turbofan Degradation Dataset
* **FEMTO** (PRONOSTIA) Bearing Dataset
* **XJTU-SY** Bearing Dataset
* **N-C-MAPSS** New Turbofan Degradation Dataset
* **Dummy** A tiny, simple dataset for debugging

All datasets share the same API, so they can be used as drop-in replacements for each other.
Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
This library contains a collection of common benchmark datasets for **remaining useful lifetime (RUL)** estimation.
They are provided as [LightningDataModules][lightning.pytorch.core.LightningDataModule] to be readily used in [PyTorch Lightning](https://pytorch-lightning.readthedocs.io/en/latest/).

Currently, four datasets are supported:
Currently, five datasets are supported:

* **C-MAPSS** Turbofan Degradation Dataset
* **FEMTO** (PRONOSTIA) Bearing Dataset
* **XJTU-SY** Bearing Dataset
* **N-C-MAPSS** New Turbofan Degradation Dataset
* **Dummy** dataset for debugging

All datasets share the same API, so they can be used as drop-in replacements for each other.
Expand Down
39 changes: 38 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ torch = "^1.9.0"
pytorch-lightning = "^1.4.4"
scikit-learn = "^1.0.0"
tqdm = "^4.62.2"
h5py = "^3.10.0"

[tool.poetry.group.dev.dependencies]
black = {extras = ["d"], version = "^22.8.0"}
Expand Down
6 changes: 4 additions & 2 deletions rul_datasets/reader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
* **C-MAPSS** Turbofan Degradation Dataset
* **FEMTO** (PRONOSTIA) Bearing Dataset
* **XJTU-SY** Bearing Dataset
* **N-C-MAPSS** New Turbofan Degradation Dataset
Readers are the foundation of the RUL Datasets library. They provide access to the
data on disk and convert them into a common format so that other parts of the library
can interact with it. The common format is as follows:
1. Each dataset consists of multiple sub-datasets. The indices of these sub-datasets
are called `FD`, following CMAPSS convention.
are called `FD`, following C-MAPSS convention.
1. Each sub-dataset contains a development (`dev`), a validation (`val`) and test split
(`test`).
Expand All @@ -18,7 +19,7 @@
represent run-to-failure experiments.
1. At each time step of a time series we have a window of features and a target RUL
value. The target is the RUL value of the last time step of the window.
value. The target is the RUL value of the window's last time step.
A reader class, e.g. the [CmapssReader][rul_datasets.reader.cmapss.CmapssReader]
represents a dataset and can manipulate it to your liking. A reader object has access
Expand Down Expand Up @@ -193,4 +194,5 @@
from .cmapss import CmapssReader
from .femto import FemtoReader, FemtoPreparator
from .xjtu_sy import XjtuSyReader, XjtuSyPreparator
from .ncmapss import NCmapssReader
from .dummy import DummyReader
4 changes: 2 additions & 2 deletions rul_datasets/reader/cmapss.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""The NASA CMAPSS Turbofan Degradation dataset is a collection of simulated
"""The NASA C-MAPSS Turbofan Degradation dataset is a collection of simulated
degradation experiments on jet engines. It contains four sub-datasets named FD1, FD2,
FD3 and FD4 which differ in operation conditions and possible failure types."""

Expand Down Expand Up @@ -97,7 +97,7 @@ def __init__(
Ragab et al. This only affects FD002 and FD004 due to them having multiple
operation conditions.
For more information about using readers refer to the [reader]
For more information about using readers, refer to the [reader]
[rul_datasets.reader] module page.
Args:
Expand Down
Loading

0 comments on commit bd788f8

Please sign in to comment.