{"id":31040431,"url":"https://github.com/rahulrmcoder/smart-lending-ally","last_synced_at":"2025-09-23T15:52:19.696Z","repository":{"id":301184896,"uuid":"1008446146","full_name":"RahulRmCoder/Smart-Lending-Ally","owner":"RahulRmCoder","description":"Smart Lending Ally is an AI-driven loan recommendation platform that helps borrowers find optimal lending options across 10 major Indian banks using dual-model classification (XGBoost + Random Forest) with 98.33% accuracy.","archived":false,"fork":false,"pushed_at":"2025-06-25T14:59:02.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T15:49:44.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RahulRmCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T14:55:55.000Z","updated_at":"2025-06-25T14:59:05.000Z","dependencies_parsed_at":"2025-06-25T15:59:48.499Z","dependency_job_id":null,"html_url":"https://github.com/RahulRmCoder/Smart-Lending-Ally","commit_stats":null,"previous_names":["rahulrmcoder/smart-lending-ally"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RahulRmCoder/Smart-Lending-Ally","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FSmart-Lending-Ally","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FSmart-Lending-Ally/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FSmart-Lending-Ally/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FSmart-Lending-Ally/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RahulRmCoder","download_url":"https://codeload.github.com/RahulRmCoder/Smart-Lending-Ally/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FSmart-Lending-Ally/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275081662,"owners_count":25402336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-14T08:40:31.783Z","updated_at":"2025-09-23T15:52:14.662Z","avatar_url":"https://github.com/RahulRmCoder.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Lending Ally: AI-Powered Loan Recommendation System\n\n## 🎯 Overview\n\nSmart Lending Ally is an innovative AI-driven loan recommendation platform that revolutionizes how borrowers find the most suitable lending options in India's complex financial landscape. The system utilizes a unique dual-model classification approach combining XGBoost and Random Forest algorithms to predict loan eligibility across 10 prominent Indian banks with an impressive 98.33% average accuracy.\n\n### Key Features\n\n- **🤖 Dual-Model Classification**: Intelligently selects between XGBoost and Random Forest models based on performance metrics\n- **🎯 Multi-Criteria Suitability Scoring**: Goes beyond simple eligibility to evaluate interest rates, processing times, and affordability\n- **📊 Dynamic Weighting System**: Customized recommendations for 5 loan types (Home, Car, Education, Personal, Gold)\n- **🏦 Multi-Bank Coverage**: Supports 10 major Indian banks including SBI, HDFC, ICICI, Axis Bank, and more\n- **📈 Comprehensive Visualization**: User-friendly charts and explanations for transparent decision-making\n- **🔍 Explainable AI**: Natural language explanations for all recommendations\n\n## 🏗️ System Architecture\n\nThe Smart Lending Ally system follows a sophisticated pipeline:\n\n1. **Data Preprocessing**: Feature engineering with financial ratios (DTI, LTI) and categorical encoding\n2. **Dual-Model Training**: Comparative selection between Random Forest and XGBoost for each bank\n3. **Suitability Scoring**: Multi-criteria evaluation using weighted factors\n4. **Recommendation Generation**: Ranked suggestions with detailed explanations\n5. **Visualization**: Interactive charts and comprehensive reports\n\n## 📊 Dataset\n\nThe system uses a comprehensive dataset featuring:\n\n- **2,000 synthetic loan application profiles** representing realistic Indian financial scenarios\n- **25 features per profile** including demographics, financial details, and loan specifics\n- **10 major Indian banks** with specific eligibility criteria\n- **5 loan categories**: Home, Car, Education, Personal, and Gold loans\n- **Income range**: ₹15,000 to ₹200,000 monthly\n- **CIBIL scores**: 300 to 900 range\n\n### Supported Banks\n\n| Bank | Accuracy | Model Used |\n|------|----------|------------|\n| IndusInd Bank | 99.25% | XGBoost |\n| ICICI Bank | 98.75% | XGBoost |\n| Punjab National Bank | 98.50% | XGBoost |\n| Kotak Mahindra Bank | 98.50% | XGBoost |\n| HDFC Bank | 98.25% | XGBoost |\n| Axis Bank | 98.25% | XGBoost |\n| State Bank of India | 97.75% | XGBoost |\n| Union Bank of India | 97.50% | XGBoost |\n| Bank of Baroda | 97.50% | XGBoost |\n| Canara Bank | 96.75% | XGBoost |\n\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Python 3.11 or higher\n- 16 GB RAM (recommended)\n- Intel Core i7 processor or equivalent\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/smart-lending-ally.git\ncd smart-lending-ally\n```\n\n2. Install required dependencies:\n```bash\npip install scikit-learn xgboost pandas numpy matplotlib seaborn plotly jupyter\n```\n\n3. Launch Jupyter Notebook:\n```bash\njupyter notebook\n```\n\n4. Open the main notebook:\n```bash\nsmart_lending_ally.ipynb\n```\n\n### Quick Start\n\n1. **Open the Jupyter Notebook**: Launch `smart_lending_ally.ipynb` in your Jupyter environment\n\n2. **Run all cells**: Execute the notebook cells sequentially to:\n   - Load and preprocess the synthetic dataset\n   - Train the dual-model classification system\n   - Generate loan recommendations\n\n3. **Customize input profiles**: Modify the applicant profile in the notebook:\n```python\n# Example profile (modify in the notebook)\nprofile = {\n    'age': 42,\n    'monthly_income': 150000,\n    'cibil_score': 810,\n    'loan_type': 'Home',\n    'loan_amount': 8000000,\n    'employment_years': 15\n    # ... other features\n}\n```\n\n4. **View results**: The notebook will generate:\n   - Eligibility predictions for all 10 banks\n   - Suitability scores and rankings\n   - Interactive visualizations\n   - Detailed recommendations with explanations\n\n## 📈 Performance Metrics\n\n### Model Performance\n- **Average Accuracy**: 98.33% across all banks\n- **Recommendation Precision**: 96.7% when validated against expert evaluations\n- **Processing Time**: Real-time recommendations\n- **Scalability**: Handles diverse user profiles effectively\n\n### Key Improvements Over Existing Systems\n- **20-28% higher accuracy** compared to single-algorithm systems (70-87%)\n- **Comprehensive suitability scoring** beyond basic eligibility\n- **Transparent explanations** for all recommendations\n- **Dynamic weighting** based on loan type priorities\n\n## 🔧 Technical Implementation\n\n### Core Algorithms\n\n**Suitability Score Calculation:**\n```\nS(P,B) = wE·E(P,B) + wI·I(P,B) + wP·P(P,B) + wA·A(P,B)\n```\n\nWhere:\n- E(P,B): Eligibility component (0-1)\n- I(P,B): Interest rate favorability (0-1)  \n- P(P,B): Processing efficiency (0-1)\n- A(P,B): Affordability component (0-1)\n- w: Loan-type specific weights\n\n**Financial Ratios:**\n- Debt-to-Income Ratio (DTI): `CurrentEMI / MonthlyIncome`\n- Loan-to-Income Ratio (LTI): `LoanAmount / AnnualIncome`\n\n### Dependencies\n\nThe main notebook requires the following Python libraries:\n\n```\nscikit-learn\u003e=1.3.0\nxgboost\u003e=1.7.0\npandas\u003e=2.0.0\nnumpy\u003e=1.24.0\nmatplotlib\u003e=3.7.0\nseaborn\u003e=0.12.0\nplotly\u003e=5.14.0\njupyter\u003e=1.0.0\n```\n\nInstall all dependencies with:\n```bash\npip install scikit-learn xgboost pandas numpy matplotlib seaborn plotly jupyter\n```\n\n## 📊 Usage Examples\n\n### Example 1: High-Income Professional\nOpen the notebook and locate the applicant profile section. Modify as needed:\n```python\n# In the notebook, find and modify the profile dictionary\nprofile = {\n    'name': 'Arjun Sharma',\n    'age': 42,\n    'monthly_income': 150000,\n    'cibil_score': 810,\n    'loan_type': 'Home',\n    'loan_amount': 8000000,\n    'employment_years': 15,\n    'existing_loans': 0\n}\n```\n\n### Example 2: First-Time Car Buyer\n```python\n# Modify the profile in the notebook for car loan scenario\nprofile = {\n    'age': 28,\n    'monthly_income': 45000,\n    'cibil_score': 720,\n    'loan_type': 'Car',\n    'loan_amount': 800000,\n    'employment_years': 3\n}\n```\n\n**Note**: All examples and modifications should be made directly in the Jupyter notebook.\n\n## 🎨 Visualization Features\n\nThe system provides comprehensive visualizations:\n\n- **Eligibility Radar Charts**: Multi-bank eligibility probability comparison\n- **Suitability Score Bar Charts**: Detailed scoring breakdown\n- **Interest Rate Comparisons**: Side-by-side rate analysis\n- **Processing Time Charts**: Bank efficiency comparisons\n- **Recommendation Explanations**: Natural language justifications\n\n## 🔬 Research Contributions\n\nThis work contributes to the field through:\n\n1. **Novel Dual-Model Classification**: Strategic combination of XGBoost and Random Forest\n2. **Multi-Criteria Suitability Framework**: Holistic evaluation beyond basic eligibility\n3. **Dynamic Weighting System**: Loan-type specific prioritization\n4. **Explainable AI Integration**: Transparent recommendation reasoning\n5. **Comprehensive Validation**: Real-world scenario testing across diverse user profiles\n\n## 📚 Documentation\n\n- [Research Paper](docs/Smart_Lending_Ally_Research_Paper.pdf) - Complete IEEE conference paper\n- [Jupyter Notebook](smart_lending_ally.ipynb) - Full implementation with examples\n- Sample Outputs - Available in `docs/sample_outputs/` folder\n\n## 🤝 Contributing\n\nWe welcome contributions! To contribute:\n\n1. Fork the repository\n2. Create a new branch for your feature\n3. Make changes to the Jupyter notebook\n4. Test your modifications\n5. Submit a pull request with detailed description\n\n### Development Guidelines\n- Follow PEP 8 style guidelines for Python code\n- Add comments and markdown cells to explain complex sections\n- Test with different applicant profiles\n- Update documentation as needed\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 📞 Contact\n\n**Research Team - Jain (Deemed-to-be University)**\n\n- Rahul Rajasekharan Menon - 22btrcn222@jainuniversity.ac.in\n- Tejas Rao M N - 22btrcn296@jainuniversity.ac.in\n- Nikhil Reddy K - 22btrcn188@jainuniversity.ac.in\n- Vishal Kumar P - 22btrcn194@jainuniversity.ac.in\n- Nakul Govind S - 22btrcn180@jainuniversity.ac.in\n\n**Faculty Supervisor**\n- Dr. A. Balajee - balajee.a@jainuniversity.ac.in\n\n## 🙏 Acknowledgments\n\n- Jain (Deemed-to-be University) for research support\n- Reserve Bank of India (RBI) for financial data insights\n- National Centre for Financial Education (NCFE) for literacy statistics\n- Indian banking sector for providing realistic lending criteria\n\n## 📈 Future Work\n\n- Integration with real-time banking APIs\n- Regional loan product variations\n- Additional specialized loan categories\n- Mobile application development\n- Advanced risk assessment models\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Fsmart-lending-ally","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulrmcoder%2Fsmart-lending-ally","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Fsmart-lending-ally/lists"}