Skip to content

functional

get_lstm_dann(source_fd, target_fd, **trainer_kwargs)

Construct an LSTM-DANN approach for CMAPSS with the original hyperparameters.

Examples:

>>> import rul_adapt
>>> dm, dann, trainer = rul_adapt.construct.get_lstm_dann(3, 1)
>>> trainer.fit(dann, dm)
>>> trainer.test(dann, dm)

Parameters:

Name Type Description Default
source_fd int

The source FD of CMAPSS.

required
target_fd int

The target FD of CMAPSS.

required
trainer_kwargs Any

Overrides for the trainer class.

{}

Returns: dm: The data module for adaption of two CMAPSS sub-datasets. dann: The DANN approach with feature extractor, regressor and domain disc. trainer: The trainer object.

get_lstm_dann_config(source_fd, target_fd)

Get a configuration for the LSTM-DANN approach.

The configuration can be modified and fed to lstm_dann_from_config to create the approach.

Parameters:

Name Type Description Default
source_fd int

The source FD of CMAPSS.

required
target_fd int

The target FD of CMAPSS.

required

Returns: The LSTM-DANN configuration.

lstm_dann_from_config(config, **trainer_kwargs)

Construct a LSTM-DANN approach from a configuration.

The configuration can be created by calling get_lstm_dann_config.

Parameters:

Name Type Description Default
config DictConfig

The LSTM-DANN configuration.

required
trainer_kwargs Any

Overrides for the trainer class.

{}

Returns: dm: The data module for adaption of two CMAPSS sub-datasets. dann: The DANN approach with feature extractor, regressor and domain disc. trainer: The trainer object.