{"id":20434788,"url":"https://github.com/netcodez/loan-approval-prediction","last_synced_at":"2025-03-05T06:26:31.905Z","repository":{"id":178410682,"uuid":"661827342","full_name":"Netcodez/loan-approval-prediction","owner":"Netcodez","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-09T02:30:03.000Z","size":508,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T19:27:53.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://netcodez.github.io/loan-approval-prediction/","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/Netcodez.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-07-03T18:38:40.000Z","updated_at":"2023-09-09T01:34:41.000Z","dependencies_parsed_at":"2023-09-09T03:10:21.607Z","dependency_job_id":null,"html_url":"https://github.com/Netcodez/loan-approval-prediction","commit_stats":null,"previous_names":["netcodez/loan-approval-prediction","netcodez/loan-approval-prediction.github.io"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcodez%2Floan-approval-prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcodez%2Floan-approval-prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcodez%2Floan-approval-prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netcodez%2Floan-approval-prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Netcodez","download_url":"https://codeload.github.com/Netcodez/loan-approval-prediction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241977340,"owners_count":20051803,"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-15T08:28:55.896Z","updated_at":"2025-03-05T06:26:31.875Z","avatar_url":"https://github.com/Netcodez.png","language":"Jupyter Notebook","readme":"# Loan Approval Prediction\nThis repository contains a data analysis project that focuses on predicting loan approval status based on various applicant attributes. The dataset used for this analysis consists of information such as loan ID, gender, marital status, number of dependents, education level, employment status, applicant income, co-applicant income, loan amount, loan amount term, credit history, property area, and loan status.\n\n## Dataset\nThe dataset contains the following columns:\n\n- loan_id: Unique identifier for each loan application\n- gender: Gender of the applicant (Male or Female)\n- married: Marital status of the applicant (Yes or No)\n- dependents: Number of dependents the applicant has\n- education: Education level of the applicant (Graduate or Not Graduate)\n- self_employed: Employment status of the applicant (Yes or No)\n- applicantincome: Income of the applicant\n- coapplicantincome: Income of the co-applicant\n- loanamount: Loan amount requested by the applicant\n- loan_amount_term: Term of the loan in months\n- credit_history: Credit history of the applicant (1: Good, 0: Bad)\n- property_area: Area of the property (Rural, Semiurban, or Urban)\n- loan_status: Loan approval status (Y: Approved, N: Not Approved)\n\n## Analysis Overview\nThe goal of this project is to develop a model that can accurately predict whether a loan application will be approved or not based on the given attributes. The analysis includes data preprocessing, exploratory data analysis, feature engineering, model training, and evaluation.\n\n### Files in the Repository\nloan-approval-prediction.ipynb: Jupyter Notebook containing the complete analysis code\nloan_approval-prediction.py: Python script with the analysis code\n\nTo run this analysis on your local machine, follow these steps:\n\n### Dependencies\nThe following Python libraries are required to run the analysis:\n\n- pandas\n- numpy\n- matplotlib\n- seaborn\n- sklearn\n- xgboost\n\n## Model Development\nThe project involved building a model to predict loan default risk based on the available dataset. The following steps were followed:\n\n- Splitting the dataset into training and testing sets.\n- Applying machine learning algorithms logistic regression,  and XGBoost, to train the models on the training set.\n- Evaluating the performance of the models using various metrics, including accuracy, precision, recall, and F1-score.\n- Selecting the best-performing model based on the evaluation metrics.\n- Fine-tuning the selected model using hyperparameter optimization techniques, such as grid search or random search, to improve its performance.\n- Assessing the final model's performance on the testing set to determine its effectiveness in predicting loan default risk.\n\n## Model Results\nThe initial models yielded varying results, with logistic regression achieving an accuracy of 78% and an F1-score of 0.86 for default cases. However, the model showed some limitations, such as relatively low precision and recall for default cases. To address these limitations, an ensemble model based on XGBoost was developed and fine-tuned.\n\nThe final XGBoost model achieved the following performance on the testing set:\n\nAccuracy: 100%\nPrecision: 1.0\nRecall: 1.0\nF1-score: 1.0\nThe XGBoost model demonstrated improved performance compared to the initial logistic regression model.\n\n## Conclusion\nIn this analysis, a dataset containing loan application information was explored, preprocessed, and used to develop a model for predicting loan default risk. The final XGBoost model achieved a high level of accuracy and performed better than the initial logistic regression model.\n\nIt's important to note that the performance of the model can be further enhanced by obtaining a larger and more diverse dataset. Additionally, ongoing monitoring and updating of the model with new data will help ensure its continued accuracy and effectiveness in predicting loan default risk.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcodez%2Floan-approval-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetcodez%2Floan-approval-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetcodez%2Floan-approval-prediction/lists"}