An advanced machine learning system for predicting loan default risk in microfinance institutions, tailored for African financial ecosystems. A scalable, explainable AI system for predicting loan default risk and optimizing lending decisions in microfinance environments like Susu Digital.
CrediSense AI is an advanced machine learning system designed to predict loan default risk in microfinance environments.
Built for platforms like Susu Digital, it enables:
- Data-driven lending decisions
- Risk-aware credit scoring
- Explainable AI insights
- XGBoost model with hyperparameter tuning
- 1M+ synthetic financial dataset
- SHAP explainability (global + local)
- Risk threshold optimization
- REST API with FastAPI
- Production-ready architecture
- Predict default probability
- Classify risk (Low / Medium / High)
- Optimize decision thresholds
- Explain predictions using SHAP
- Synthetic dataset (generated)
- Age
- Income
- Loan Amount
- Savings Balance
- Missed Payments
- Loan Duration
- Debt-to-Income Ratio
- Savings Ratio
- Payment Stress
- Python
- Pandas / NumPy
- Scikit-learn
- XGBoost
- FastAPI
- Matplotlib
- SHAP
pip install -r requirements.txtpython src/generate_data.pypython src/train.pycd api
uvicorn main:app --reloadcurl -X POST http://127.0.0.1:8000/predict \
-H "Content-Type: application/json" \
-d @tests/test.jsonInstead of fixed 0.5 threshold:
- Model finds optimal threshold using Precision-Recall tradeoff
- Improves recall (catching defaulters)
- Reduces financial risk
- Feature importance visualization
- Per-user explanation
- Transparent decision-making
Deep learning (LSTM for time-series financial behavior)
Real-time streaming predictions
Integration with mobile money APIs
React dashboard for loan officers
To build an AI-powered credit scoring engine for Africa, enabling:
Financial inclusion
Risk reduction
- Fork the repo
- Create feature branch
- Commit changes
- Submit PR
Boateng Prince Agyenim (Mmabiaa) Fullstack Engineer | AI Developer Founder, Susu Digital


