The interview problem
Design an offline service that separates normal operating modes before analysts compare equipment behavior.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume multivariate sensors, maintenance logs and no automatic shutdown action. Resample with missingness indicators, build windows and learn a low-dimensional representation followed by a mixture or change-point baseline. Label regimes with analyst interpretation rather than arbitrary cluster IDs. Split chronologically and by machine. Persist regime transitions with uncertainty; a new mode can be legitimate rather than anomalous.
2. Trace the design or derivation
Align sensors → encode windows → assign regimes → detect transitions → compare within modes
Use maintenance logs as review evidence, not unrestricted future input to a historical detector. A mode discovered after an overhaul should be labeled with its discovery time. For longitudinal reports, keep a mapping between old and new regime definitions so retraining does not rewrite apparent historical trends without explanation.
3. Calculate the example
A machine spends 70 hours idle at 2 units/hour and 30 hours active at 10: the aggregate mean is 4.4. A later 50/50 mix gives 6 without any within-mode deterioration. Comparing only global averages produces a misleading performance alarm.
4. Failure cases and trade-offs
A sensor recalibration can create an apparent new mode. Overlapping windows leak information across random train/test splits. More components capture subtle modes but fragment stable operations. Track both within-regime residuals and changes in regime occupancy before assigning a cause.
5. Validation, follow-ups and self-review
Hold out entire operating cycles and simulate a sensor offset. Follow-up: how would online detection differ from offline segmentation? Self-review: separate mixture shifts, within-mode changes and instrumentation faults.
Sources and related practice
Technical reference: scikit-learn.org — Gaussian mixture modeling; temporal regime and intervention interpretation are original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Design an anomaly detection system; Predict equipment failure with censored records.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.