{"id":21230719,"url":"https://github.com/loopglitch26/casual-lending","last_synced_at":"2026-04-28T19:37:27.126Z","repository":{"id":188604055,"uuid":"679055599","full_name":"LoopGlitch26/Casual-Lending","owner":"LoopGlitch26","description":"Causal Inference on Loan Approval","archived":false,"fork":false,"pushed_at":"2023-08-16T03:07:02.000Z","size":356,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T18:14:35.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LoopGlitch26.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-16T02:18:03.000Z","updated_at":"2024-10-25T12:08:20.000Z","dependencies_parsed_at":"2023-08-16T04:25:25.810Z","dependency_job_id":null,"html_url":"https://github.com/LoopGlitch26/Casual-Lending","commit_stats":null,"previous_names":["loopglitch26/casual-lending"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoopGlitch26%2FCasual-Lending","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoopGlitch26%2FCasual-Lending/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoopGlitch26%2FCasual-Lending/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoopGlitch26%2FCasual-Lending/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoopGlitch26","download_url":"https://codeload.github.com/LoopGlitch26/Casual-Lending/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243672487,"owners_count":20328768,"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","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":"2024-11-20T23:39:11.474Z","updated_at":"2025-12-29T19:15:06.490Z","avatar_url":"https://github.com/LoopGlitch26.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Casual-Lending\n\n**Project Overview:**\n- Exploration and modeling of a loan eligibility dataset to understand factors influencing loan approval.\n- Utilizes data preprocessing, feature engineering, and causal inference techniques.\n- Python libraries used: NumPy, Pandas, LightGBM, and DoWhy.\n\n**Dataset:**\n- Contains loan applicant details, financial data, and loan approval outcomes.\n- Features include gender, marital status, education level, credit history, property area, loan amount, etc.\n- Target variable: Loan approval status (0 for not approved, 1 for approved).\n\n**Data Preprocessing:**\n- Handle missing categorical values by replacing with mode, numerical values with mean.\n- Drop irrelevant columns, create 'TotalIncome' by summing 'ApplicantIncome' and 'CoapplicantIncome'.\n- Scale 'TotalIncome', 'LoanAmount', and 'Loan_Amount_Term' using MinMaxScaler.\n\n**Feature Engineering:**\n- Introduce 'Appreciability' to capture loan appreciation potential based on financial attributes.\n- Create 'IncomeComb' to merge 'Education' and 'Self_Employed', indicating stable income source.\n\n**Causal Inference:**\n- Construct a causal graph to model variable relationships and potential causal pathways.\n- Highlight relationships like 'Credit_History' -\u003e 'Loan_Status', 'Property_Area' -\u003e 'LoanAmount', etc.\n\n![causal_graph](https://github.com/LoopGlitch26/Casual-Lending/assets/53336715/55a40437-367a-4c46-b5b2-0a24e0f8f7c1)\n\n\n**Model Development:**\n- Divide dataset into training and test sets.\n- Train LightGBM classifier on training data to predict 'Loan_Status'.\n- Generate counterfactual samples using the model to observe outcomes under varied attributes.\n\n**Results and Analysis:**\n- Gain insights into factors influencing loan approval.\n- Causal graph reveals potential causal links between attributes.\n- Trained model predicts loan approval probabilities, assess impact of changing features.\n\n**Business Implications:**\n- Assist lending institutions in informed loan approval decisions.\n- Counterfactual analysis helps understand how outcomes change under different scenarios.\n\n![interpretation_graph](https://github.com/LoopGlitch26/Casual-Lending/assets/53336715/5d448237-fc46-4aa9-befd-a6c8df6d2009)\n\n\n**Conclusion:**\n- Successful exploration, preprocessing, and modeling of loan data.\n- Causal analysis uncovers attribute relationships.\n- Counterfactual insights aid in equitable lending decisions.\n- Valuable information for fair and informed lending practices.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopglitch26%2Fcasual-lending","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopglitch26%2Fcasual-lending","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopglitch26%2Fcasual-lending/lists"}