Fault diagnosis models#

BaseFaultDiagnosis#

class ice.fault_diagnosis.models.base.BaseFaultDiagnosis(window_size: int, stride: int, batch_size: int, lr: float, num_epochs: int, device: str, verbose: bool, name: str, random_seed: int, val_ratio: float, save_checkpoints: bool)[source]#

Bases: BaseModel, ABC

Base class for all fault diagnosis models.

Parameters:
  • window_size (int) – The window size to train the model.

  • stride (int) – The time interval between first points of consecutive sliding windows in training.

  • batch_size (int) – The batch size to train the model.

  • lr (float) – The larning rate to train the model.

  • num_epochs (float) – The number of epochs to train the model.

  • device (str) – The name of a device to train the model. cpu and cuda are possible.

  • verbose (bool) – If true, show the progress bar in training.

  • name (str) – The name of the model for artifact storing.

  • random_seed (int) – Seed for random number generation to ensure reproducible results.

  • val_ratio (float) – Proportion of the dataset used for validation, between 0 and 1.

  • save_checkpoints (bool) – If true, store checkpoints.

MLP#

class ice.fault_diagnosis.models.mlp.MLP(window_size: int, stride: int = 1, hidden_dim: int = 256, batch_size: int = 128, lr: float = 0.001, num_epochs: int = 10, device: str = 'cpu', verbose: bool = False, name: str = 'mlp_fault_diagnosis', random_seed: int = 42, val_ratio: float = 0.15, save_checkpoints: bool = False)[source]#

Bases: BaseFaultDiagnosis

Multilayer Perceptron (MLP) consists of input, hidden, output layers and ReLU activation. Each sample is reshaped to a vector (B, L, C) -> (B, L * C) where B is the batch size, L is the sequence length, C is the number of sensors.

Parameters:
  • window_size (int) – The window size to train the model.

  • hidden_dim (int) – The dimensionality of the hidden layer in MLP.

  • batch_size (int) – The batch size to train the model.

  • lr (float) – The larning rate to train the model.

  • num_epochs (float) – The number of epochs to train the model.

  • device (str) – The name of a device to train the model. cpu and cuda are possible.

  • verbose (bool) – If true, show the progress bar in training.

  • name (str) – The name of the model for artifact storing.

  • random_seed (int) – Seed for random number generation to ensure reproducible results.

  • val_ratio (float) – Proportion of the dataset used for validation, between 0 and 1.

  • save_checkpoints (bool) – If true, store checkpoints.

TCN#

class ice.fault_diagnosis.models.tcn.TCN(window_size: int, stride: int = 1, hidden_dim: int = 256, kernel_size: int = 5, num_layers: int = 4, dilation_base: int = 2, dropout: float = 0.2, batch_size: int = 128, lr: float = 0.001, num_epochs: int = 10, device: str = 'cpu', verbose: bool = False, name: str = 'tcn_fault_diagnosis', random_seed: int = 42, val_ratio: float = 0.15, save_checkpoints: bool = False)[source]#

Bases: BaseFaultDiagnosis

Temporal Convolutional Network (TCN)-based Fault Diagnosis method. The implementation is based on the paper Lomov, Ildar, et al. “Fault detection in Tennessee Eastman process with temporal deep learning models.” Journal of Industrial Information Integration 23 (2021): 100216.

Parameters:
  • window_size (int) – The window size to train the model.

  • hidden_dim (int) – The number of channels in the hidden layers of TCN.

  • kernel_size (int) – The kernel size of the residual blocks of TCN.

  • num_layers (int) – The number of residual blocks in TCN.

  • dilation_base (int) – The base of the exponent that will determine the dilation on every layer.

  • dropout (float) – The rate of dropout in training of TCN.

  • batch_size (int) – The batch size to train the model.

  • lr (float) – The larning rate to train the model.

  • num_epochs (float) – The number of epochs to train the model.

  • device (str) – The name of a device to train the model. cpu and cuda are possible.

  • verbose (bool) – If true, show the progress bar in training.

  • name (str) – The name of the model for artifact storing.

  • random_seed (int) – Seed for random number generation to ensure reproducible results.

  • val_ratio (float) – Proportion of the dataset used for validation, between 0 and 1.

  • save_checkpoints (bool) – If true, store checkpoints.