"매 sensor data로 장비 failure 를 발생 전에 predict — RUL 추정 또는 anomaly detection.". 매 reactive (고장 후) / preventive (정기점검) 대비 매 비용 30-50% 절감. 2025-2026 modern stack: edge IoT + transformer time-series (PatchTST, TimesFM) + foundation model (Chronos, MOIRAI).
fromsklearn.ensembleimportIsolationForestclf=IsolationForest(contamination=0.01,random_state=42)clf.fit(X_normal)scores=-clf.score_samples(X_new)# 매 high = anomaly
Autoencoder reconstruction error
importtorch,torch.nnasnnclassAE(nn.Module):def__init__(self,d,h=32):super().__init__()self.enc=nn.Sequential(nn.Linear(d,64),nn.ReLU(),nn.Linear(64,h))self.dec=nn.Sequential(nn.Linear(h,64),nn.ReLU(),nn.Linear(64,d))defforward(self,x):returnself.dec(self.enc(x))# anomaly score = reconstruction MSE — 매 정상 data로 학습 후 임계 설정
LSTM RUL regression (C-MAPSS style)
importtorch,torch.nnasnnclassRULNet(nn.Module):def__init__(self,n_sensors=14,hidden=64):super().__init__()self.lstm=nn.LSTM(n_sensors,hidden,num_layers=2,batch_first=True,dropout=0.2)self.head=nn.Sequential(nn.Linear(hidden,32),nn.ReLU(),nn.Linear(32,1))defforward(self,x):# x: (B, T, n_sensors)out,_=self.lstm(x)returnself.head(out[:,-1]).squeeze(-1)# RUL cycles# loss = MSE on clipped RUL (max 125 typical)
언제: industrial sensor pipeline 설계, anomaly detection MVP, RUL model training, foundation model TS 적용.
언제 X: 매 safety-critical (aviation engine)에서 매 ML model 단독 — physics-based digital twin과 ensemble.
❌ 안티패턴
Train on imbalanced labels naive: 매 failure 1% — class weighting / focal loss / oversampling 필수.
Static threshold for anomaly: drift 가 매 threshold obsolete — adaptive (ADWIN) 필요.
Ignore sensor lag / sync: 매 multi-sensor fusion에서 매 timestamp align 필수.
No business cost model: false alarm 비용 vs missed failure 비용 — threshold tuning에 매 반영.
Predict only RUL without uncertainty: 매 quantile / probabilistic 예측 (PatchTST quantile, conformal) 필요.