atulgaikwad12 / creditdefultprediction

ML Project to predict credit default predication based on cardholder's several characteristics and payment behavior

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Credit Defult Prediction

ML Project to predict probability of credit default by cardholder, based on various characteristics and payment behavior of cardholder.


Raw Data Description

This dataset contains information on default payments, demographic factors, credit data, history of payment, and bill statements of credit card clients in Taiwan from April 2005 to September 2005.

  • ID: ID of each client

  • LIMIT_BAL: Amount of given credit in NT dollars (includes individual and family/supplementary credit

  • SEX: Gender (1=male, 2=female)

  • EDUCATION: (1=graduate school, 2=university, 3=high school, 4=others, 5=unknown, 6=unknown)

  • MARRIAGE: Marital status (1=married, 2=single, 3=others)

  • AGE: Age in years

  • PAY_0 to PAY_6

    • PAY_0: Repayment status in September, 2005

      1. "-1" = pay duly, 1=payment delay for one month
      2. "2" = payment delay for two months.....
      3. "8" = payment delay for eight months
      4. "9" = payment delay for nine months and above
    • PAY_2: Repayment status in August, 2005 (scale same as above)

    • PAY_3: Repayment status in July, 2005 (scale same as above)

    • PAY_4: Repayment status in June, 2005 (scale same as above)

    • PAY_5: Repayment status in May, 2005 (scale same as above)

    • PAY_6: Repayment status in April, 2005 (scale same as above)

  • BILL_AMT1 to BILL_AMT6

    • BILL_AMT1: Amount of bill statement in September, 2005 (NT dollar)
    • BILL_AMT2: Amount of bill statement in August, 2005 (NT dollar)
    • BILL_AMT3: Amount of bill statement in July, 2005 (NT dollar)
    • BILL_AMT4: Amount of bill statement in June, 2005 (NT dollar)
    • BILL_AMT5: Amount of bill statement in May, 2005 (NT dollar)
    • BILL_AMT6: Amount of bill statement in April, 2005 (NT dollar)
  • PAY_AMT1 to PAY_AMT6

    • PAY_AMT1: Amount of previous payment in September, 2005 (NT dollar)
    • PAY_AMT2: Amount of previous payment in August, 2005 (NT dollar)
    • PAY_AMT3: Amount of previous payment in July, 2005 (NT dollar)
    • PAY_AMT4: Amount of previous payment in June, 2005 (NT dollar)
    • PAY_AMT5: Amount of previous payment in May, 2005 (NT dollar)
    • PAY_AMT6: Amount of previous payment in April, 2005 (NT dollar)
  • default.payment.next.month : Default payment (1=yes, 0=no)


Acknowledgement for dataset -

The original dataset can be found here at the UCI Machine Learning Repository.
Lichman, M. (2013). UCI Machine Learning Repository. Irvine, CA: University of California, School of Information and Computer Science.


Project Installation Steps :-

Conda command to create virtual env inside current directory

conda create --prefix ./env python=3.7 -y && conda activate ./env

To install required libraries listed inside requirements.txt

pip install requirements.txt
conda list

To create conda.yaml file which will be used by mlflow

conda env export > conda.yaml

Git commands to publish code (remote repo - "origin", local branch default name - "master", renamed to "main")

git init 
git add .
git commit -m 'First Commit Msg'
git status 
git remote add origin git@github.com:username/new_repo
git branch -m master main
git push -u origin main

MlFlow command to run Project To consider default entry point main

mlflow run . --no-conda

run any specific entry point in MLproject file

mlflow run . -e get_data --no-conda

Passing config file overriding the defult defined inside MLproject file

mlflow run . -e get_data -P config=configs/your_config.yaml --no-conda

Defining experiment name

mlflow run . -e main --experiment-name firstime --no-conda

Command for mlflow UI portal (-p portnumber is optional)

mlflow ui -p portnumber

Extra mlflow cmd for ref

mlflow models serve -m runs:/runid/model -p portnumber

About

ML Project to predict credit default predication based on cardholder's several characteristics and payment behavior

License:MIT License


Languages

Language:HTML 87.6%Language:Jupyter Notebook 12.3%Language:Python 0.1%Language:CSS 0.0%Language:JavaScript 0.0%Language:Shell 0.0%Language:Procfile 0.0%