Predictive Maintenance — Nonlinear Fault Detection
An MLP (Tanh-activation) autoencoder reconstructs the healthy operating manifold; reconstruction error above a learned threshold flags an anomaly SPC's linear PCA-style residual would miss on nonlinear process relationships.
mlautoencoderanomaly-detection
Concept
Upgrades the linear PCA detector to a nonlinear autoencoder: an MLP with a tanh bottleneck learns to reconstruct the healthy operating envelope; reconstruction error above a learned percentile threshold is the anomaly score. Because the bottleneck is nonlinear it flags a fault off a curved manifold that a linear PCA subspace can't separate.
The math
Show the governing equations
Forward pass, backprop, and the Adam optimizer are hand-written in numpy — no deep-learning dependency. Xavier/Glorot init keeps tanh training stable; a fixed seed makes it deterministic.
Execution
Same interface as the PCA detector (ml.anomaly) — an endpoint can pick either method without changing its calling code.