# Kenya Energy Access AI System - Documentation
## Model Card: Credit Scoring Model
### Model Details
- **Model Name**: Energy Access Credit Scoring Model v1.0
- **Model Type**: XGBoost Gradient Boosted Trees
- **Version**: 1.0.0
- **Date**: January 2025
- **Owner**: Kenya Energy AI Team
- **Contact**: ml-team@energy-ai.ke
### Intended Use
**Primary Use Cases:**
- Assess creditworthiness of PAYG (Pay-As-You-Go) energy customers
- Optimize payment collection strategies
- Identify customers at risk of default
- Support expansion of energy access to underserved areas
**Target Users:**
- Energy providers (utilities, mini-grids, solar companies)
- Government policy makers (REREC, KPLC)
- Financial institutions
- Development organizations
**Out-of-Scope Uses:**
- Should NOT be used as sole determinant for service denial
- Not designed for credit decisions outside energy access context
- Not intended for individual loan approval decisions
### Training Data
**Data Sources:**
- Smart meter readings (60%)
- M-PESA payment transactions (25%)
- Customer demographic data (10%)
- Grid reliability data (5%)
**Data Size:**
- Training: 500,000 customer records
- Validation: 100,000 customer records
- Time period: 2023-2024 (24 months)
**Data Preprocessing:**
- PII anonymization using SHA-256 hashing
- Location generalization to 2 decimal places
- Missing value imputation using median/mode
- Outlier capping at 99th percentile
**Feature Engineering:**
- Payment behavior features (15 features)
- Energy usage patterns (12 features)
- Demographic indicators (8 features)
- Temporal features (5 features)
- **Total Features**: 40
### Model Architecture
```
XGBoost Parameters:
- max_depth: 6
- learning_rate: 0.1
- n_estimators: 100
- min_child_weight: 3
- gamma: 0.1
- subsample: 0.8
- colsample_bytree: 0.8
- objective: binary:logistic
- eval_metric: auc
```
### Performance Metrics
**Overall Performance:**
- AUC-ROC: 0.82
- Precision: 0.76
- Recall: 0.79
- F1-Score: 0.77
- Accurac …