- Introduction & Physical Data Challenges
In rotating machinery such as electrofans, early detection of bearing faults before catastrophic failure is of critical importance. The vibration data collected from sensors includes six primary signal variables: velocity, acceleration, crest factor, kurtosis, and peak values.
Initial analysis revealed that direct modeling on raw data faces deep challenges:
· Severe class overlap in raw variables: Healthy signals (Class 0), severe faults (Class 1), and mild faults (Class 2) show overlapping distributions.
· Local and structural installation effects: A specific vibration level at one measurement position (MP_LOC) or on a particular component (COMP_NAME) may indicate normal operation, while the same level on another component may indicate advanced failure.
· Presence of outliers and skewed distributions: Amplitude features exhibit strong instantaneous fluctuations and right‑skewed distributions.
- Exploratory Data Analysis (EDA) – Why Generic Models Fail
2.1 Severe Overlap in Raw Vibration Features
[
]
Figure 1: Distribution of Vel, Rms (RMS) across three classes – showing strong right‑skew and overlap.
[
]
Figure 2: Distribution of Crest (RMS) across three classes – crest factor ranges between 2.5 and 3.5 with identical overlapping distributions.
The Crest Factor variable shows nearly identical distribution across all three classes in the range of 2.5 to 3.5. The Vel, Rms variable exhibits strong right‑skewed distribution in the range of 0 to 3.
2.2 Presence of Outliers and the Necessity of Robust Scaling
[
]
Figure 3: Boxplot of velocity‑to‑acceleration ratio showing severe outliers (values above 30–40).
Composite features contain severe outliers, making RobustScaler essential for proper scaling.
2.3 Baseline Model Performance Ceiling & Class 2 Challenge
[
]
Figure 4: Initial confusion matrix of generic models without local layer – Macro F1: 59.71%
- Feature Engineering
Feature Name Formula Industrial Purpose
peak_to_rms Vel_Peak / (Vel_Rms + eps) Evaluates sudden impact forces
severity_index Vel_Rms * Acc_Rms * Crest Overall fault severity indicator
early_fault_index (Kurt * Crest) / (Acc_Rms + eps) Detects early‑stage surface defects
Group Z‑Score (x - μ_group) / (σ_group + eps) Removes physical sensor position effects
- Preprocessing & Feature Selection
Using RFE (Recursive Feature Elimination) with a Random Forest estimator, the top 30 features were selected. All features were then scaled using RobustScaler to mitigate outlier effects.
- Model Architecture & Intelligent Hybrid Routing
The final prediction is a hybrid ensemble consisting of:
· 3 Tree‑Based Models:
· XGBoost – 35% weight
· LightGBM – 35% weight
· RandomForest – 30% weight
· Local KNN Layer with inverse‑distance weighting for context‑aware predictions.
Adaptive Alpha Blending Logic
Nearest Neighbor Distance (min_dist) Alpha (KNN Weight) 1‑Alpha (Ensemble Weight) Decision Logic
< 0.5 0.90 0.10 Full trust in local sensor pattern
0.5 – 1.5 0.70 0.30 Local priority with ensemble support
1.5 – 3.0 0.40 0.60 Ensemble priority due to increased distance
3.0 0.15 0.85 Full trust in global ensemble generalization
- Validation & Overfitting Monitoring
Metric Value
5‑Fold CV F1‑Macro 88.42% ± 0.015
Train Accuracy 88.65%
Train F1‑Macro 88.31%
The convergence of training and validation scores clearly demonstrates no overfitting and strong generalization capability on unseen data.
- Final Submission Specifications
Item Value
Output File Name submission15.csv
Total Predicted Samples 600 rows
Class Distribution Class 0: 241, Class 1: 238, Class 2: 121
Final Test F1‑Macro 89.46%
- Key Technical Phrases Used in This Project
Phrase Context
Adaptive Alpha Blending Dynamic weighting between local KNN and global ensemble
Hybrid Routing Routing samples based on local cluster density
Group‑Aware Feature Engineering Z‑score normalization per (COMP_NAME, MP_LOC)
Leakage‑Free Validation GroupKFold to keep identical rows together
Outlier‑Resilient Scaling RobustScaler for skewed vibration data
Contextual KNN Neighbor search restricted to same component & position
- Conclusion
This project demonstrates that combining global ensemble models with a locally‑aware KNN layer significantly improves bearing fault diagnosis, especially for imbalanced classes and location‑dependent vibration patterns. The final model achieved a top‑5 ranking in the competition test phase, with a robust and generalizable pipeline that balances accuracy, interpretability, and industrial applicability.
Repository: [https://github.com/H4dis/super-fan-electro]
Full Code & Extended Documentation: Available in the repository.
Top comments (0)