Creator prompt
The idea behind this presentation
Feature Engineering for Maintenance Analytics – Slides
Slide 1: Title Slide
Feature Engineering Deep Dive
Vibration RMS, Kurtosis, Crest Factor, Rate of Change, Interaction Terms, Categorical Encoding
Course: Maintenance Analytics – Day 3 Supplement
Topics: Time-domain vibration features, derived features, categorical handling
Running case: P-101, P-102, P-103, C-201
Slide 2: Why These Features Matter
Raw sensor data is rarely usable directly by machine learning algorithms.
Feature engineering transforms raw signals into informative variables that:
Capture degradation physics (vibration energy, impulsiveness)
Measure dynamics (how fast condition is changing)
Expose combined effects (temperature × vibration)
Convert categories into numerical inputs
The quality of features often matters more than the choice of algorithm.
Three families covered in this deck:
Family Features Purpose
Time-domain vibration features RMS, kurtosis, crest factor Describe signal energy and impulsiveness
Derived features Rate of change, interaction terms Capture dynamics and combined effects
Categorical encoding Label, one-hot, target, frequency Convert categories to numbers
Slide 3: Vibration RMS – Definition and Formula
RMS = Root Mean Square. It measures the overall energy content of a vibration signal.
Formula (discrete):
R
M
S
=
1
N
∑
i
=
1
N
x
i
2
RMS=
N
1
i=1
∑
N
x
i
2
where
x
i
x
i
are the sampled vibration amplitudes and
N
N is the number of samples in the window.
Formula (continuous):
R
M
S
=
1
T
∫
0
T
x
(
t
)
2
d
t
RMS=
T
1
∫
0
T
x(t)
2
dt
Units: mm/s (velocity), g (acceleration), or µm (displacement), depending on the sensor.
Interpretation: RMS is the "effective" vibration level. It is always positive and increases as vibration energy increases.
Slide 4: Vibration RMS – Interpretation and Maintenance Use
Why it matters:
RMS is the standard metric in ISO 10816 / ISO 20816 for evaluating machine vibration severity.
It correlates with overall condition: as bearings wear, misalignment grows, or looseness develops, RMS rises.
It is robust to noise and easy to compute from any accelerometer.
Typical ISO 20816 zones (velocity RMS for machines):
Zone RMS Range (mm/s) Interpretation
A < 2.3 New machine, good condition
B 2.3–4.5 Acceptable for long-term operation
C 4.5–7.1 Unsatisfactory, plan maintenance
D > 7.1 Damage likely, act immediately
Limitation: RMS responds late in the degradation process. It rises clearly only when damage is already significant. It is less sensitive to early-stage bearing defects than kurtosis or crest factor.
Running case example (C-201):
Date Vibration RMS (mm/s) Status
Baseline 3.0 Zone B – acceptable
7 days before failure 4.8 Zone C – plan maintenance
Failure day 6.2 Zone C/D – act now
Feature name in model: vib_rms_7d_mean, vib_rms_7d_std
Slide 5: Kurtosis – Definition and Formula
Kurtosis measures the "peakedness" or impulsiveness of a signal. It is the fourth standardized moment.
Formula:
K
=
1
N
∑
i
=
1
N
(
x
i
−
x
ˉ
)
4
σ
4
K=
σ
4
N
1
∑
i=1
N
(x
i
−
x
ˉ
)
4
where
x
ˉ
x
ˉ
is the mean and
σ
σ is the standard deviation of the signal.
Excess kurtosis:
K
e
x
c
e
s
s
=
K
−
3
K
excess
=K−3. Used so that a normal (Gaussian) signal has excess kurtosis of 0.
Reference values:
Signal type Kurtosis
Pure sine wave 1.5
Gaussian noise 3.0
Healthy rolling bearing ~3.0
Early-stage bearing defect 5–10+
Advanced bearing defect (broadband) 3–5 (decreases again)
Slide 6: Kurtosis – Interpretation and Maintenance Use
Why it matters:
A healthy rotating machine produces a roughly Gaussian vibration signal → kurtosis ≈ 3.
When a bearing race or rolling element develops a spall, crack, or pit, each impact produces a sharp spike in the signal → kurtosis rises sharply.
Kurtosis is therefore an early indicator of localized bearing defects, often rising weeks before RMS changes.
Key behavior — the "kurtosis hump":
Degradation stage Kurtosis RMS
Healthy ~3 Low
Very early defect (impacts begin) Rising (4–6) Barely changed
Developing defect High (6–10+) Rising
Advanced defect (broadband noise) Falling back toward 3–5 High
Critical insight: Kurtosis rises early, peaks, then falls as the signal becomes broadband. By the time RMS is high, kurtosis may already be declining. That is why both features are needed together.
Limitation: Kurtosis is sensitive to outliers and sensor spikes; must be computed over a stable window and filtered.
Running case example (C-201 bearing):
Week Kurtosis RMS (mm/s) Interpretation
Week −12 3.1 3.0 Healthy
Week −6 5.8 3.4 Early bearing defect – kurtosis alert
Week −2 8.2 4.8 Developing defect – RMS now rising
Failure week 5.0 6.2 Advanced – broadband noise dominates
Feature name in model: vib_kurtosis_7d_mean, vib_kurtosis_max
Slide 7: Crest Factor – Definition and Formula
Crest Factor (CF) is the ratio of the peak amplitude to the RMS amplitude of the signal.
Formula:
C
F
=
x
p
e
a
k
R
M
S
CF=
RMS
x
peak
where
x
p
e
a
k
=
max
∣
x
i
∣
x
peak
=max∣x
i
∣ over the window.
Reference values:
Signal type Crest Factor
Pure sine wave 1.41 (√2)
Healthy rotating machine 3–4
Early bearing defect 5–10+
Advanced bearing defect 4–5 (decreases as RMS rises)
Slide 8: Crest Factor – Interpretation and Maintenance Use
Why it matters:
Crest factor directly measures impulsiveness relative to energy.
Early bearing defect: sharp impacts create high peaks while RMS is still low → CF rises.
As the defect worsens, the impacts become more frequent and the overall energy (RMS) rises → CF falls back.
Relationship to kurtosis: Both measure impulsiveness. Kurtosis uses the fourth moment (more sensitive to extreme peaks); crest factor uses only the single maximum peak (simpler, but sensitive to a single spike). They are complementary.
Comparison across degradation stages:
Stage RMS Kurtosis Crest Factor
Healthy Low ~3 3–4
Early defect Low Rising Rising
Developing Rising High High
Advanced High Falling Falling
Practical use: Crest factor is often used with RMS in a two-dimensional health map — a point moving up and right indicates progressing degradation.
Running case example (C-201 bearing):
Week CF RMS (mm/s) Status
Week −12 3.5 3.0 Healthy
Week −6 6.2 3.4 Early defect – CF alert
Week −2 7.1 4.8 Developing
Failure week 4.3 6.2 Advanced
Feature name in model: vib_crest_factor
Slide 9: Combining RMS, Kurtosis, and Crest Factor
No single feature tells the whole story. Together they describe the degradation stage.
Stage RMS Kurtosis Crest Factor Action
Healthy Low ~3 3–4 Routine monitoring
Early defect Low Rising (4–6) Rising (5–6) Increase monitoring frequency
Developing defect Rising High (6–10) High (6–8) Plan maintenance within 2–4 weeks
Advanced defect High Falling (3–5) Falling (4–5) Act now – imminent failure
Modeling implication:
If only RMS is used: detection is late (misses early defects).
If only kurtosis or CF is used: false positives from transient spikes, and detection of advanced stage is poor.
Using all three: earlier detection, fewer false alarms, better stage classification.
Example feature set for C-201 model:
Feature Role
vib_rms_7d_mean Overall energy – late-stage indicator
vib_rms_7d_std Stability of energy
vib_kurtosis_7d_mean Early-stage impulsiveness
vib_crest_factor_7d_mean Peak-to-energy ratio – early indicator
vib_kurtosis_rate Change in kurtosis → is defect progressing?
Rule of thumb: Use RMS for severity, kurtosis for early detection, crest factor as a cross-check.
Slide 10: Rate of Change – Definition and Formula
Rate of change (RoC) measures how fast a feature is changing over time. It is a discrete approximation of the derivative.
Formula (simple rate):
R
o
C
t
=
x
t
−
x
t
−
k
k
RoC
t
=
k
x
t
−x
t−k
where
x
t
x
t
is the current value,
x
t
−
k
x
t−k
is the value
k
k periods ago, and
k
k is the lag window (e.g., 7 days).
Formula (percentage rate):
R
o
C
t
(
%
)
=
x
t
−
x
t
−
k
x
t
−
k
×
100
%
RoC
t
(%)
=
x
t−k
x
t
−x
t−k
×100%
Formula (exponential weighted rate): Use exponentially weighted moving averages to emphasize recent change.
Slide 11: Rate of Change – Interpretation and Maintenance Use
Why it matters:
Level tells you where you are. Rate of change tells you where you are going.
Two assets can have the same vibration level but very different trajectories:
Asset Vibration (mm/s) RoC (mm/s/week) Interpretation
P-101 4.0 +0.01 Stable – monitor
P-102 4.0 +0.30 Rapidly degrading – act now
Maintenance applications:
Degradation velocity: how fast is the asset approaching failure?
RUL extrapolation: if vibration is rising linearly at 0.15 mm/s per week and the failure threshold is 6.0 mm/s, estimated RUL = (6.0 − current) ÷ 0.15 weeks.
Trend confirmation: a single high reading may be a spike; a consistently positive rate of change confirms real degradation.
Change detection: abrupt RoC changes may indicate a new failure mode or a maintenance event.
Running case example (P-101 seal):
Week Vibration RMS RoC (mm/s/week)
Week 1 2.8 —
Week 2 2.9 +0.10
Week 3 3.2 +0.30
Week 4 3.8 +0.60
Week 5 4.6 +0.80
Interpretation: RoC is accelerating — the seal is degrading faster. This triggers a work order before the level itself crosses the threshold.
Feature names in model: vib_roc_7d, vib_roc_pct_7d, vib_roc_acceleration (change in RoC)
Slide 12: Interaction Terms – Definition and Formula
An interaction term is a new feature created by combining two or more existing features — usually by multiplication, division, or difference.
Common forms:
Type Formula Example
Product
x
1
×
x
2
x
1
×x
2
vibration × temperature
Ratio
x
1
/
x
2
x
1
/x
2
pressure drop ÷ flow
Difference
x
1
−
x
2
x
1
−x
2
temperature − ambient temperature
Normalized difference
(
x
1
−
x
2
)
/
x
2
(x
1
−x
2
)/x
2
temperature rise ratio
Why they are needed:
Linear models (logistic regression, linear regression) can only capture additive effects.
Many physical degradation processes are multiplicative or synergistic: high vibration and high temperature together are worse than the sum of either alone.
Interaction terms let the model capture these combined effects.
Slide 13: Interaction Terms – Interpretation and Maintenance Use
Examples in maintenance:
Interaction Formula What it captures
Vibration × Temperature vib_rms × temp Combined mechanical and thermal stress; bearing failure often shows both rising together
Pressure drop ÷ Current pressure_drop / current Pump efficiency proxy — seal or impeller degradation reduces efficiency
Temperature − Ambient temp − ambient_temp True machine heating, independent of weather
Vibration × Kurtosis vib_rms × kurtosis Severity × impulsiveness — high values indicate advanced localized defect
Load × Age load × days_since_replace Cumulative damage — high load over time accelerates wear
Flow ÷ Vibration flow / vib_rms Efficiency per unit vibration — declining means degradation
Running case example (P-101 seal):
Feature Week 1 Week 4 Interpretation
Vibration RMS 2.8 3.8 Rising
Pressure drop 0.10 0.18 Rising
Vibration × Pressure drop 0.28 0.68 Interaction more than doubles → strong signal of seal degradation
Modeling guidance:
Create interactions guided by domain knowledge — not exhaustively.
Each new interaction adds a dimension; too many can cause overfitting and multicollinearity.
For tree-based models (random forest, XGBoost), interactions are learned automatically to some extent, but explicit terms can still help.
Always validate that the interaction improves model performance on held-out data.
Feature names in model: vib_x_temp, pressure_drop_per_current, temp_rise, vib_x_kurtosis
Slide 14: Categorical Encoding – Why It Is Needed
Machine learning algorithms work with numbers, not categories.
Maintenance data contains many categorical variables:
Variable Type Examples
Failure mode Nominal Seal leak, bearing failure, coupling wear, impeller wear
Priority Ordinal Low, Medium, High, Critical
Asset ID Nominal (high cardinality) P-101, P-102, P-103, C-201, …
Shift Nominal Day, Swing, Night
Work order type Nominal Corrective, Preventive, Predictive, Emergency
Technician Nominal (high cardinality) Names or IDs
Manufacturer Nominal SKF, Grundfos, Atlas Copco
Encoding converts these into numerical features that the model can use.
Slide 15: Categorical Encoding – Methods
1. Label encoding
Assigns an integer to each category: Low = 0, Medium = 1, High = 2, Critical = 3.
Use for: ordinal categories where order matters (priority, severity).
Avoid for: nominal categories — the model may incorrectly infer that "Night (3) > Day (1)".
2. One-hot encoding
Creates a binary column for each category: Is_Seal_Leak, Is_Bearing_Failure, etc.
Use for: nominal categories with low cardinality (< ~15 categories).
Avoid for: high cardinality (asset IDs, technician names) — creates hundreds of sparse columns.
3. Target encoding (mean encoding)
Replaces each category with the mean of the target variable for that category.
Example: if 60% of seal leak WOs led to failure within 7 days, Failure_Mode_Seal_Leak = 0.60.
Use for: high-cardinality categories.
Risk: data leakage — must use out-of-fold encoding and careful cross-validation.
4. Frequency encoding
Replaces each category with its count or frequency in the dataset.
Use for: high-cardinality categories when frequency carries signal (common failure modes may be more predictable).
Simple, no leakage risk, but loses the identity of the category.
5. Ordinal encoding
Explicitly assigns ordered integers based on domain knowledge.
Same as label encoding but used intentionally for ordered categories.
6. Embeddings
Learns a dense vector representation for each category.
Use for: very high cardinality (thousands of assets) in neural networks.
Requires more data and more complex modeling.
Slide 16: Categorical Encoding – Choosing the Right Method
Variable Cardinality Order? Recommended Encoding
Priority (Low/Medium/High/Critical) 4 Yes Ordinal encoding (0–3)
Failure mode (seal leak, bearing, coupling, impeller) 4–10 No One-hot encoding
Work order type 4 No One-hot encoding
Shift 3 No One-hot encoding
Asset ID 4 in our case; 100s in real plant No Target encoding or embeddings; frequency encoding for simple models
Technician ID 10–50 No Frequency encoding or target encoding
Manufacturer 5–20 No One-hot encoding or target encoding
Practical guidance:
Start with one-hot for low-cardinality nominal variables and ordinal for ordered variables.
Use target encoding for high-cardinality variables, but always with out-of-fold computation to avoid leakage.
Monitor for leakage — a category that appears only once and has target = 1 will encode to 1.0, giving the model a shortcut.
Group rare categories into an "Other" category to reduce sparsity.
Running case example (P-101 model features):
Raw variable Encoded feature(s) Method
Priority priority_encoded (0–3) Ordinal
Failure mode fm_seal_leak, fm_bearing, fm_coupling, fm_impeller One-hot
Asset asset_freq (count) or asset_target_enc Frequency or target
Shift shift_day, shift_swing, shift_night One-hot
Slide 17: Putting It All Together – Feature Set for C-201 Bearing Model
Complete engineered feature set combining all six feature types:
Category Feature Type
RMS vib_rms_7d_mean Time-domain energy
RMS vib_rms_7d_std Energy stability
Kurtosis vib_kurtosis_7d_mean Early impulsiveness
Kurtosis vib_kurtosis_rate Progression of impulsiveness
Crest factor vib_crest_factor_7d_mean Peak-to-energy ratio
Rate of change vib_roc_7d Degradation velocity
Rate of change vib_roc_acceleration Degradation acceleration
Interaction vib_x_temp Combined mechanical-thermal stress
Interaction temp_rise True machine heating
Categorical failure_mode_seal_leak One-hot encoded
Categorical priority_encoded Ordinal encoded
Feature importance results from Day 3 XGBoost model:
Feature Importance
vib_rms_7d_mean 0.32
vib_roc_7d 0.22
temp_7d_mean 0.15
days_since_replace 0.11
vib_kurtosis_7d_mean 0.08
vib_rms_7d_std 0.06
vib_crest_factor 0.04
failure_mode_* 0.02
Insight: RMS and rate of change dominate; kurtosis and crest factor provide early-warning value even if their overall importance is moderate.
Slide 18: Key Takeaways
Vibration RMS measures overall energy — robust but late to react to early faults.
Kurtosis detects early localized bearing defects — rises early, peaks, then falls as damage spreads.
Crest factor measures impulsiveness relative to energy — a complementary early indicator.
Use all three together to stage degradation and reduce false alarms.
Rate of change captures trajectory — the difference between a stable asset and a rapidly degrading one.
Interaction terms capture combined effects — essential for linear models, helpful for tree-based models.
Categorical encoding converts categories into numbers — choose the method based on cardinality and order.
Start simple, validate every engineered feature on held-out data, and let feature importance guide pruning.
End of Feature Engineering Slides
Follow Design: {"palette":["Cleanroom off-white #F8FAFC — primary slide background","Machined steel #0F172A — primary text and structural headings","Diagnostic azure #0284C7 — key feature callouts and math variables","Warning amber #F59E0B — mid-stage defect alerts and rate of change indicators","Failure crimson #DC2626 — critical ISO Zone D alerts and failure thresholds","Subsurface tint #E2E8F0 — card borders and structural dividers","Normal operational green #16A34A — healthy baseline indicators"],"fonts":{"IBM Plex Sans":"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap","IBM Plex Mono":"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"},"type":"IBM Plex Sans in Bold (tracking -0.01em) for crisp technical headers and clear body hierarchy; IBM Plex Mono in Regular and Medium for formulas, discrete calculus terms, ISO threshold bands, and literal feature tags.","layout":"Dense 4-column engineering workbench grid with dedicated horizontal formula strip banners, split-screen sensor progression matrices, and a persistent top-right breadcrumb for the running asset case (P-101 / C-201).","framework_treatment":"Precision spec-sheet panels with 1px hairline outlines, tabular severity heatmaps using ISO 20816 color chips, formula callout enclosures with light blue wash backgrounds, and pill-shaped variable tags for ML model inputs.","feels_like":"An enterprise reliability engineering specification manual meets a high-precision laboratory test bench"}