{"id":23599903,"url":"https://github.com/jebin1999/creditriskmodel","last_synced_at":"2025-07-10T22:10:07.647Z","repository":{"id":268382884,"uuid":"904176427","full_name":"Jebin1999/CreditRiskmodel","owner":"Jebin1999","description":"A machine learning project for credit risk prediction using the UCI Default of Credit Card Clients dataset. The model predicts whether a client will default on their credit card payment based on their demographic, payment history, and bill statement data.","archived":false,"fork":false,"pushed_at":"2024-12-16T12:01:30.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T18:08:39.280Z","etag":null,"topics":["credit","credit-risk","creditriskmodeling","quantitative-analysis","quantitative-finance","risk-analysis"],"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/Jebin1999.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-16T11:49:42.000Z","updated_at":"2024-12-16T12:01:34.000Z","dependencies_parsed_at":"2024-12-16T12:38:09.806Z","dependency_job_id":null,"html_url":"https://github.com/Jebin1999/CreditRiskmodel","commit_stats":null,"previous_names":["jebin1999/creditriskmodel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jebin1999/CreditRiskmodel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jebin1999%2FCreditRiskmodel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jebin1999%2FCreditRiskmodel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jebin1999%2FCreditRiskmodel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jebin1999%2FCreditRiskmodel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jebin1999","download_url":"https://codeload.github.com/Jebin1999/CreditRiskmodel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jebin1999%2FCreditRiskmodel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264675166,"owners_count":23647949,"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":["credit","credit-risk","creditriskmodeling","quantitative-analysis","quantitative-finance","risk-analysis"],"created_at":"2024-12-27T11:34:54.672Z","updated_at":"2025-07-10T22:10:07.630Z","avatar_url":"https://github.com/Jebin1999.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# **Predictive Credit Risk Model**\n\nThis repository contains a machine learning project for **credit risk prediction** using the **UCI Default of Credit Card Clients dataset**. The model predicts whether a client will default on their credit card payment based on their demographic, payment history, and bill statement data.\n\n---\n\n## **Overview**\n\nCredit risk assessment is crucial for financial institutions to minimize losses. This project utilizes a **Random Forest Classifier** to predict the likelihood of a client defaulting, with results evaluated using metrics like **Accuracy**, **ROC AUC Score**, and **Classification Report**.\n\n---\n\n## **Dataset**\n\nThe dataset used is sourced from the [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients) and contains:\n\n- **30,000 samples** of credit card clients.\n- **23 features** including:\n  - **Demographic information**: `SEX`, `AGE`, `EDUCATION`, `MARRIAGE`\n  - **Payment history**: `PAY_0` to `PAY_6`\n  - **Bill statements**: `BILL_AMT1` to `BILL_AMT6`\n  - **Payment amounts**: `PAY_AMT1` to `PAY_AMT6`\n- **Target variable**: `default` (1 = Default, 0 = No Default)\n\n---\n\n## **Workflow**\n\n1. **Data Preprocessing**:\n   - Filling missing values with column means.\n   - Standardizing numeric features using `StandardScaler`.\n   - Encoding categorical variables using `LabelEncoder`.\n\n2. **Class Balance Check**:\n   - The dataset has an equal distribution of `Default` and `No Default` classes (4673 samples each), ensuring no need for resampling techniques.\n\n3. **Model Training**:\n   - A **Random Forest Classifier** is trained.\n   - Hyperparameter tuning performed using `GridSearchCV`.\n\n4. **Model Evaluation**:\n   - **Accuracy**: 85.4%\n   - **ROC AUC Score**: 0.924\n   - Detailed **Classification Report** and **Confusion Matrix** are generated.\n\n5. **Feature Importance**:\n   - The top predictors of credit default are identified, including `LIMIT_BAL`, `PAY_0`, and `BILL_AMT` features.\n\n---\n\n## **Results**\n\n### Key Metrics:\n| Metric          | Value   |\n|-----------------|---------|\n| **Accuracy**    | 85.4%   |\n| **ROC AUC**     | 0.924   |\n| **Precision**   | 0.85–0.86 |\n| **Recall**      | 0.85–0.86 |\n\n### **Confusion Matrix**:\nThe confusion matrix highlights the prediction performance for both classes:\n| **Actual/Predicted** | **No Default** | **Default** |\n|-----------------------|----------------|-------------|\n| **No Default**        | 4024          | 649         |\n| **Default**           | 711           | 3962        |\n\n---\n\n## **Installation**\n\nTo run this project locally, follow these steps:\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/\u003cYourUsername\u003e/\u003cRepoName\u003e.git\n   cd \u003cRepoName\u003e\n   ```\n\n2. **Install Dependencies**:\n   Install the required Python libraries using `pip`:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Run the Jupyter Notebook**:\n   Open the Jupyter Notebook to explore the code:\n   ```bash\n   jupyter notebook\n   ```\n\n---\n\n## **Requirements**\n\n- Python 3.8+\n- Libraries:\n   - pandas\n   - numpy\n   - matplotlib\n   - seaborn\n   - scikit-learn\n   - imbalanced-learn (if SMOTE is applied in future versions)\n\n---\n\n## **Visualizations**\n\n1. **Confusion Matrix**:\n   ![Confusion Matrix](/ConfusionMatrix.png)\n\n2. **Feature Importance**:\n   ![Feature Importance](/FeatureImportance.png)\n\n---\n\n## **Next Steps**\n\n- Compare performance with other models like **XGBoost** and **LightGBM**.\n- Deploy the model as an API for real-time predictions.\n- Add visualization dashboards for better insights.\n\n---\n\n## **Contributions**\n\nContributions are welcome! Feel free to fork the repository, create a new branch, and submit a pull request.\n\n---\n\n## **License**\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\n---\n\n## **Author**\n\n- **Jebin Larosh Jervis**  \n- Connect with me: [LinkedIn](https://www.linkedin.com/in/jebin-larosh-jervis-a52938123/) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjebin1999%2Fcreditriskmodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjebin1999%2Fcreditriskmodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjebin1999%2Fcreditriskmodel/lists"}