Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Predict Machinery Failure Under Imbalance

EasyMachine Learning00:00
Practice interviewer
In session
5 left
00:00

Your question is Predict Machinery Failure Under Imbalance. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Business Context

NorthForge Manufacturing operates 1,200 CNC machines across 14 plants and wants to predict equipment failure 24 hours in advance so maintenance can intervene before unplanned downtime. Failures are rare but expensive, making this a classic imbalanced binary classification problem.

Dataset

You are given a historical machine telemetry dataset collected at hourly resolution over 18 months.

Feature GroupCountExamples
Sensor readings18temperature_mean, vibration_rms, pressure_std, spindle_current
Usage / load9operating_hours, load_pct, cycle_count_24h, idle_ratio
Maintenance history6days_since_last_service, prior_failures_90d, component_replaced
Machine metadata5machine_type, plant_id, manufacturer, install_age_days
Derived temporal features10rolling_mean_6h, rolling_std_24h, trend_slope_12h
  • Target: failure_24h — whether the machine fails in the next 24 hours
  • Class balance: roughly 0.8% positive, 99.2% negative
  • Missing data: 3-7% missing in some sensors due to telemetry dropouts; maintenance fields may be missing for newly installed machines

Success Criteria

A strong solution should improve substantially over the majority-class baseline and achieve high recall on true failures while keeping false alarms low enough for plant maintenance teams to act on alerts. Aim for recall >= 0.75 with precision >= 0.20, plus strong ranking quality on rare events.

Constraints

  • Batch scoring every hour for ~1,200 machines
  • Predictions should be explainable to maintenance engineers
  • False negatives are more costly than false positives, but alert volume must remain manageable
  • Retraining should be feasible weekly using standard Python ML tooling

Deliverables

  1. Build a binary classification pipeline that handles severe class imbalance correctly.
  2. Explain your modeling choice, resampling or weighting strategy, and threshold selection.
  3. Show how you would preprocess missing values and categorical features.
  4. Evaluate the model using metrics appropriate for rare-event prediction.
  5. Describe how you would deploy and monitor the model in production.