Back to Projects
Anomaly Detection / Maritime

Ship Engine Anomaly Detection

A statistical rule and two unsupervised models compared for flagging abnormal ship-engine sensor readings, as candidates for engineering review.

Type
Anomaly Detection
Domain
Maritime Operations
Methods
IQR, One-Class SVM, Isolation Forest
Origin
Cambridge DS Career Accelerator coursework

The Challenge

An IQR rule flagged 422 of 19,535 ship-engine readings (2.16%) where at least two sensors were out of range, giving engineers a short list of readings to review.

Engine faults are expensive at sea, and sensor data arrives faster than engineers can review it. With no labelled faults, the question was how to flag a manageable set of unusual readings, and how statistical and machine-learning methods compare.

Approach

01
Data review
19,535 readings from six sensors (engine speed, lubricating-oil pressure and temperature, fuel pressure, coolant pressure and temperature); no missing or duplicate rows.
02
Statistical rule
Interquartile-range (IQR) bounds per sensor; a reading is flagged when at least two sensors are out of range at once.
03
Unsupervised models
One-Class SVM and Isolation Forest on standardised sensor values, at several settings.
04
Visual check
PCA used to plot the flagged readings in two dimensions.

Results

MethodSettingReadings flagged
IQR rule (2+ sensors out of range)-422 (2.16%)
One-Class SVMnu = 0.05980 (5.02%)
Isolation Forestcontamination = auto2,892 (14.8%)
Isolation Forestcontamination = 0.05977 (5.0%)

The IQR rule is the only result not fixed in advance. For One-Class SVM and Isolation Forest, the nu and contamination settings decide roughly what share of readings is flagged, so their 5% figures reflect the chosen setting rather than a discovery. Readings flagged by several methods are the strongest candidates for review.

Limitations: no labelled faults, so none of the methods can be scored for accuracy; readings are treated independently, without time order.

How it was tested

TEST REPORTTEST REPORTSHIP ENGINESHIP ENGINE
Checked
  • Data reviewed before modelling: 19,535 readings from six sensors, no missing or duplicate rows.
  • A statistical rule compared with two unsupervised models at several settings, and the flagged readings plotted with PCA.
Found
  • For One-Class SVM and Isolation Forest, the settings decide roughly what share is flagged, so their 5% figures reflect the chosen setting rather than a discovery. Only the IQR result is not fixed in advance.
Limits
  • No labelled faults, so none of the methods can be scored for accuracy.
  • Readings are treated independently, without time order.

Technology Stack

Python scikit-learn One-Class SVM Isolation Forest PCA pandas Matplotlib Seaborn
Interested in this work or something similar?