Skip to content

dummy

This dummy dataset is intended for testing and debugging purposes, not for benchmarking. If your approach can fit this dataset it means that it is able to learn how to estimate RUL. It does not mean it is good at it.

DummyReader

Bases: AbstractReader

This reader represents a simple, small dummy dataset that can be uses to test or debug RUL estimation approaches. It contains ten runs for each split with a single feature which makes it easy to hold in memory even on low-end computers. The dataset is so simple that it can be sufficiently fit by a three-layer perceptron in less than 50 epochs.

Each run is randomly generated by sampling a run length between 90 and 110 time steps and creating a piece-wise linear RUL function y(t) with a maximum value of max_rul. The feature x(t) is then calculated as:

x(t) = exp(-0.05 * y(t) + N(offset, 0.01)) + N(0, noise_factor)

where N(loc, scale) is a function drawing a sample from a normal distribution with a mean of loc and a standard deviation of scale. The dev, val and test splits are all generated the same way with a different fixed random seed. This makes generating the dataset deterministic.

The dummy dataset contains two sub-datasets. The first has uses an offset of 0.5 and a noise_factor of 0.01. The second uses an offset of 0.75 and a noise_factor of 0.02. Both use a default window size of 10 and are min-max scaled between -1 and 1 with a scaler fitted on the dev split.

Examples:

>>> import rul_datasets
>>> fd1 = rul_datasets.reader.DummyReader(fd=1)
>>> features, labels = fd1.load_split("dev")
>>> features[0].shape
(81, 10, 1)

fds: List[int] property

Indices of available sub-datasets.

__init__(fd, window_size=None, max_rul=50, percent_broken=None, percent_fail_runs=None, truncate_val=False, truncate_degraded_only=False)

Create a new dummy reader for one of the two sub-datasets. The maximum RUL value is set to 50 by default. Please be aware that changing this value will lead to different features, too, as they are calculated based on the RUL values.

For more information about using readers, refer to the reader module page.

Parameters:

Name Type Description Default
fd int

Index of the selected sub-dataset

required
window_size Optional[int]

Size of the sliding window. Default defined per sub-dataset.

None
max_rul Optional[int]

Maximum RUL value of targets.

50
percent_broken Optional[float]

The maximum relative degradation per time series.

None
percent_fail_runs Optional[Union[float, List[int]]]

The percentage or index list of available time series.

None
truncate_val bool

Truncate the validation data with percent_broken, too.

False
truncate_degraded_only bool

Only truncate the degraded part of the data (< max RUL).

False

prepare_data()

This function has no effect as there is nothing to prepare.