Coder Social home page Coder Social logo

k-katarzyna / lead_conversion_probability Goto Github PK

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

"Machine learning in banking - predicting lead conversion for a lending product" - my final project from the Data Science bootcamp organized by "Kodołamacz". Article about the project: https://www.kodolamacz.pl/blog/2024-01-04-uczenie-maszynowe-w-bankowosci

Jupyter Notebook 94.28% Python 5.72%
banking data-science machine-learning python scikit-learn imbalanced-classes

lead_conversion_probability's Introduction

Introduction

In today's digital banking, converting leads into customers presents a considerable challenge. Leads come from diverse channels like online searches, display ads, email campaigns and affiliate partnerships. Happy Customer Bank is also grappling with low conversion rates and seeks to improve its performance for a particular loan product.

This task originates from a competition hosted by Analytics Vidhya in 2015, though its details are no longer available.

The Dataset

The dataset contains information about leads, including details such as gender, date of birth, monthly income, employer name, loan amount, interaction data and more. A detailed description can be found in the "Project_main" notebook.

Several challenges are present, including:

  • highly imbalanced classes,
  • a large number of missing values,
  • various data types,
  • some variables with unknown meaning.

The Goal

The primary task is to estimate the probability of loan disbursal, using ROC AUC as the evaluation metric. By identifying potential customers who are more likely to be approved for a loan, the bank can focus its efforts more effectively, thereby increasing its conversion rate.

An additional step involves assessing the classification skills of the tested models at different discrimination thresholds. Although the choice of threshold can be influenced by various business factors, a secondary objective is to determine the optimal threshold as a reference point.

The Content of the Project

The progress, results and comments are documented in the "Project-main" notebook. Utilities specifically developed for this project are located in the "src" module. Due to the extended duration of certain experiments, their results were saved in the "results_data" folder.

To recreate the environment using the included YAML file:

conda env create -f environment.yml

To activate the environment:

conda activate happy_customer_bank

To create the Jupyter environment kernel:

python -m ipykernel install --user --name=happy_customer_bank

Summary and Conclusion

The project encompassed an exploration of various aspects, including data preprocessing, class balancing, hyperparameter tuning and model selection.

In the initial testing phase, four models were identified that exhibited similar behavior and potential effectiveness for the problem. Following further optimization, the RandomForestClassifier achieved the highest ROC AUC score of 0.85. However, all of these models could be similarly effective. The final results are depicted below.

Roc curves

This solution could serve as a promising starting point for further efforts to enhance the customer conversion rate at the bank. However, it should be noted that the developed models may not be suitable for precise classification, irrespective of the chosen discrimination threshold.

The experiments conducted represent only an initial exploration in tackling this challenge. As the focus was primarily on tree-based ensembles, there is potential to explore other model types and different data transformations.

lead_conversion_probability's People

Contributors

k-katarzyna avatar

Watchers

 avatar

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.