An AI-powered Field Recommendation System for Rwanda Polytechnic. Includes full ML pipeline: preprocessing with no data leakage, training Neural Networks/XGBoost/Random Forest, cross-validation, feature importance, PCA, SHAP & LIME explainability, statistical tests, and a deployable recommendation engine.
# π Field Recommendation System for Rwanda Polytechnic
### _AI-Powered Student Placement Using Machine Learning & Explainable AI (XAI)_
This repository contains a **complete end-to-end Machine Learning pipeline** for predicting the most suitable academic field for Rwanda Polytechnic (RP) students. The system is built using **Neural Networks, XGBoost, and Random Forest**, combined with **interpretability tools (SHAP & LIME)** and strict **noβdata-leakage** preprocessing workflows.
The model analyzes **TVET combinations, examination boards, and subject-level marks** to generate accurate, fair, and explainable field recommendations.
---
## π Key Features
### π§ Machine Learning Pipeline
- Neural Network (Keras)
- XGBoost
- Random Forest
- 5-Fold Stratified Cross-Validation
- Overfitting & generalization analysis
### π Feature Engineering & Analysis
- One-Hot Encoding (train-only)
- Standard Scaling (train-only)
- Mutual Information
- Recursive Feature Elimination (RFE)
- Permutation Importance
- PCA (Dimensionality Reduction)
- Feature Perturbation (robustness test)
### π Explainability (XAI)
- **SHAP values** for global feature impacts
- **LIME** for local instance-based explanations
- SubjectβField correlation analysis
- Per-class performance insights
### π Visualizations Included
- ROC curves (multi-class)
- Confusion matrices (raw & normalized)
- Heatmaps (MI, correlation, perturbation)
- PCA scree plots
- CV score boxplots
- Confidence distribution histogram
- Feature importance charts
### π― Deployable Recommendation System
A reusable class:
```python
FieldRecommendationSystem
```
Allows real-time predictions with:
- Predicted field
- Confidence level
- Top-3 recommended fields
- Support for unseen boards/combos
---
## π Project Structure
```
.
βββ ai_field_recommendation_at_rp.ipynb # Full ML pipeline and analysis
βββ results/
β βββ field_recommendation_model.h5 # Saved best model
β βββ field_recommendation_model.pkl
β ββ β¦