Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 1.44 KB

File metadata and controls

79 lines (50 loc) · 1.44 KB

💳 Credit Risk Prediction

This project predicts a customer's credit risk level using Machine Learning.

The goal is to classify customers based on their financial and demographic information into different credit score categories.


🚀 Project Overview

Banks and financial institutions need to assess whether a customer is risky before approving loans.

This project builds a machine learning model to predict:

  • Low Risk
  • Average Risk
  • High Risk

image

🛠️ Tech Stack

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • Joblib

📁 Project Structure


📊 Workflow

1️⃣ Data Preprocessing

  • Clean column names
  • Clean target column
  • Encode categorical features
  • Split features (X) and target (y)

2️⃣ Model Training

  • Train/Test split (80/20)
  • Random Forest Classifier
  • Evaluate model accuracy
  • Save trained model

3️⃣ Prediction

  • Load saved model
  • Align feature columns
  • Predict risk category for new customers

🧠 Model Used

RandomForestClassifier from Scikit-learn.

Why Random Forest?

  • Handles categorical data well
  • Robust to overfitting
  • Works well without heavy tuning

📈 How to Run

1️⃣ Clone the Repository 2️⃣ Create Virtual Environment (Recommended) 3️⃣ Install requirements 4️⃣ Train the Model 5️⃣ run streamlit app