Coder Social home page Coder Social logo

mfundo-debug / credit_scoring_seg Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13.93 MB

Credit scoring and segmentation

License: MIT License

Jupyter Notebook 97.74% Python 1.18% HTML 0.36% CSS 0.15% JavaScript 0.56%
credit data data-visualization eda jupyte machine-learning machine-learning-algorithms ml python random-forest random-forest-classifier django django-project django-rest-framework

credit_scoring_seg's Introduction

Credit Scoring and Segmentation

  • Credit scoring is a statistical analysis performed by lenders and financial institutions to access a person's creditworthiness. Lenders use credit scoring, among other things, to decide on whether to extend or deny credit.

  • Credit Segmentation refers to the process of dividing the customers into groups based on their credit behavior. The customers are divided into different segments based on their credit score, credit history, and other factors.

  • The goal of this project is to segment customers into different groups based on their credit behavior.

  • You can access the dataset via this link here https://statso.io/credit-scoring-case-study/ or you can download it from the data folder in this repository.

Overview

Credit scoring aims to determine the creditworthiness of individuals based on their credit profiles. By analyzing factors such as payment history, credit utilization ratio, and number of credit accounts, we can assign a credit score to each individual, providing a quantitative measure of their creditworthiness.

The given dataset includes features such as age, gender, marital status, education level, employment status, credit utilization ratio, payment history, number of credit accounts, loan amount, interest rate, loan term, type of loan, and income level.

Your task is to calculate credit scores and segment customers based on their credit scores to gain insights into different customer groups.

Run the Setup file to install all the libraries used in this project

Here's an example of how you can use pip to install your package:

  1. First, navigate to the directory where your setup.py file is located.

  2. Run the following command to build a distribution package:

    python setup.py sdist
    

    This will create a dist directory containing a .tar.gz file that contains your package.

  3. Run the following command to install your package using pip:

    pip install dist/credit_system-0.1.tar.gz
    

    This will install your package and its dependencies.

After installing the package, you can use the credit_system command to run your application. For example, if you have defined a main() function in your manage.py file, you can run your application using the following command:

credit_system manage.py main

Install libraries using the requirements.txt file to install all the libraries used in this project.

pip install -r requirements.txt

FICO Formula

let p be payment history

let C be Credit Utilization Ration

let n be Number of Credit Accounts

let el be Education Level

let es be Employment Status

and it can be demonstrated mathematical wise and also in python code:

$$ FICO = (0.35p) + (0.3C) + (0.15n) + (0.1el) + (0.1es) $$

credit_score = (payment_history*0.35) + (credit_utilization_ratio*0.3) + (number_of_credit_accounts*0.15) + (education_level*0.1) + (employment_status*0.1)
credit_scores.append(credit_score)

Description of all features in the data:

  1. Age: represents the age of the customer
  2. Gender: represents gender of the customer
  3. Marital status: represents whether the customer is married or single
  4. Education level: represents the education level of the customer
  5. Employment status: represents whether the customer is employed or unemployed
  6. Credit utilization Ratio: represents the percentage of credit limit that a customer is utilizing
  7. Payment history: represents the payment history of the customer, taking into account factors such as on-time payments, delayed payments, and missed payments.
  8. Number of Credit Accounts: represents the number of credit accounts that a customer has.
  9. Loan Amount: represents the total amount of loan that a customer has taken.
  10. Interest Rate: represents the interest rate on the loan.
  11. Loan Term: represents the duration of the loan.
  12. Type of Loan: represents the type of loan taken by the customer like "Personal Loan", "Home Loan", "Auto Loan", etc.

Project Progress

Project Status The workflow is complete currently working on moving the model to django web app ๐Ÿ‘.

Django Preview:

Django Preview

Entering Details:

Entering Details #### The final output of the project

Number of customers associated with credit score segmentation levels

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.