Prepare the data
Prepare a timestamped sensor series with annotated events and known missing-data periods.
Find unusual periods. Check the operating context.
Time-series anomalies may be isolated spikes, sustained shifts or seasonal deviations. A useful alert system measures event-level detection and review burden rather than treating every large residual as a fault.
Learning concept · Not a validated service
Time-series anomalies may be isolated spikes, sustained shifts or seasonal deviations. A useful alert system measures event-level detection and review burden rather than treating every large residual as a fault.
A possible application for facilities teams: Help facilities staff investigate unusual sensor behaviour without automatically changing equipment settings. This extension is not delivered by the supplied starter.
Prepare a timestamped sensor series with annotated events and known missing-data periods.
Fit a rolling baseline and derive residual thresholds using training periods only.
Measure event recall, false alerts per day and detection delay on later annotated periods.
Create a review-only timeline showing alerts, context and technician feedback.
The supplied starter generates 240 daily values with trend, seasonality and noise. It builds lagged and shifted rolling features, trains a RandomForestRegressor on earlier rows and reports MAE on the final thirty rows.
for lag in [1, 7, 14]:
series[f"lag_{lag}"] = series["value"].shift(lag)
series["rolling_7"] = series["value"].shift(1).rolling(7).mean()
series = series.dropna()
train = series.iloc[:-30]
test = series.iloc[-30:]
model = RandomForestRegressor(n_estimators=300, random_state=42)
model.fit(train[feature_cols], train["value"])
forecast = model.predict(test[feature_cols])The source forecasts values with a random forest but does not define anomaly thresholds or evaluate detected events. Later test rows use actual earlier test values as lag inputs. This can represent rolling one-step prediction, but not a thirty-day forecast made at a single origin. There are no prediction intervals or real operational observations.
Proposed extension: Help facilities staff investigate unusual sensor behaviour without automatically changing equipment settings.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.