Results of RUL estimation using SOTA models#
This notebook presents experimental results of rul estimation on the CMAPSS dataset using the model lstm-256.
Importing libraries.
from ice.remaining_useful_life_estimation.datasets import RulCmapss
from ice.remaining_useful_life_estimation.models import IR
import pandas as pd
C:\Users\user\conda\envs\ice_testing\Lib\site-packages\tqdm\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
Initializing model class and train/test data split for fd001 subdataset
dataset_class = RulCmapss()
data, target = dataset_class.df[0], dataset_class.target[0]
test_data, test_target = dataset_class.test[0], dataset_class.test_target[0]
Reading data/C-MAPSS/fd1_train.csv: 100%|██████████| 20631/20631 [00:00<00:00, 504872.87it/s]
Reading data/C-MAPSS/fd2_train.csv: 100%|██████████| 53759/53759 [00:00<00:00, 533656.45it/s]
Reading data/C-MAPSS/fd3_train.csv: 100%|██████████| 24720/24720 [00:00<00:00, 496051.49it/s]
Reading data/C-MAPSS/fd4_train.csv: 100%|██████████| 61249/61249 [00:00<00:00, 532245.75it/s]
Reading data/C-MAPSS/fd1_train.csv: 100%|██████████| 20631/20631 [00:00<00:00, 547602.44it/s]
Reading data/C-MAPSS/fd2_train.csv: 100%|██████████| 53759/53759 [00:00<00:00, 528810.42it/s]
Reading data/C-MAPSS/fd3_train.csv: 100%|██████████| 24720/24720 [00:00<00:00, 496134.57it/s]
Reading data/C-MAPSS/fd4_train.csv: 100%|██████████| 61249/61249 [00:00<00:00, 529770.68it/s]
Reading data/C-MAPSS/fd1_test.csv: 100%|██████████| 13097/13097 [00:00<00:00, 486699.50it/s]
Reading data/C-MAPSS/fd2_test.csv: 100%|██████████| 33991/33991 [00:00<00:00, 501537.62it/s]
Reading data/C-MAPSS/fd3_test.csv: 100%|██████████| 16598/16598 [00:00<00:00, 512334.66it/s]
Reading data/C-MAPSS/fd4_test.csv: 100%|██████████| 41214/41214 [00:00<00:00, 523435.48it/s]
Reading data/C-MAPSS/fd1_test.csv: 100%|██████████| 13097/13097 [00:00<00:00, 474171.77it/s]
Reading data/C-MAPSS/fd2_test.csv: 100%|██████████| 33991/33991 [00:00<00:00, 501537.62it/s]
Reading data/C-MAPSS/fd3_test.csv: 100%|██████████| 16598/16598 [00:00<00:00, 520419.66it/s]
Reading data/C-MAPSS/fd4_test.csv: 100%|██████████| 41214/41214 [00:00<00:00, 519167.37it/s]
path_to_tar = "./"
from sklearn.preprocessing import StandardScaler, MinMaxScaler
import pandas as pd
scaler = MinMaxScaler()
trainer_data = scaler.fit_transform(data)
tester_data = scaler.transform(test_data)
trainer_data = pd.DataFrame(trainer_data, index=data.index, columns=data.columns)
tester_data = pd.DataFrame(tester_data, index=test_data.index, columns=test_data.columns)
Training and testing with difference random seed for uncertainty estimation
model_class = IR()
model_class.load_checkpoint(path_to_tar + "rul_sota.tar")
C:\Users\user\conda\envs\ice_testing\Lib\site-packages\torch\nn\modules\transformer.py:306: UserWarning: enable_nested_tensor is True, but self.use_nested_tensor is False because encoder_layer.activation_relu_or_gelu was not True
warnings.warn(f"enable_nested_tensor is True, but self.use_nested_tensor is False because {why_not_sparsity_fast_path}")
model_class.evaluate(tester_data, test_target)
Creating sequence of samples: 100%|██████████| 100/100 [00:00<00:00, 11148.24it/s]
{'rmse': 11.99217470692219, 'cmapss_score': 25394.12755711561}