Coder Social home page Coder Social logo

datasciencevishal / bank_customer_behaviour Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 364 KB

Bank Customer Behaviour Prediction

Jupyter Notebook 100.00%
cross-validation dummy-variables-encoding logistic-regression minmaxscaling randomizedsearchcv rfe rfecv

bank_customer_behaviour's Introduction

Bank Customers Behavior Prediction

Introduction

This project aims to predict the behavior of bank customers regarding their deposit subscription. It involves building predictive models using various machine learning algorithms and evaluating their performance.

Dataset

The dataset contains information about bank customers, including demographic features, financial status, and previous marketing interactions. It consists of 11,162 entries and 15 columns.

Data Preprocessing

  • Modified the target variable to have binary values (0/1).
  • Assessed categorical variables and visualized their distributions.
  • Conducted feature engineering and handled categorical variables by creating dummy features.
  • Scaled numerical features using MinMax scaling.

Model Building

  • Divided the data into train and test sets.
  • Built logistic regression and random forest models.
  • Evaluated the models' performance on both training and test sets.
  • Conducted cross-validation to assess the models' generalization performance.

Feature Selection

  • Utilized Recursive Feature Elimination (RFE) and Recursive Feature Elimination with Cross-Validation (RFECV) for feature selection.
  • Identified important features based on model performance and cross-validation scores.

Hyperparameter Tuning

  • Performed hyperparameter tuning using RandomizedSearchCV for the Random Forest model.
  • Evaluated various combinations of hyperparameters to optimize the model's performance.

Results

  • Logistic Regression:

    • Training Accuracy: 70.98%
    • Test Accuracy: 69.32%
  • Random Forest:

    • Training Accuracy: 99.85%
    • Test Accuracy: 69.32%
  • Cross-Validation:

    • Logistic Regression Mean CV Score: 70.24%
    • Random Forest Mean CV Score: 69.24%
    • LeaveOneOut Mean SV Score: 66.90%
  • Hyperparameter Tuning:

    • Best Random Forest Model:
      • Max Depth: 15
      • Max Features: 15
      • Min Samples Leaf: 20
      • N Estimators: 100
      • Mean CV Score: 71.86%

Conclusion

  • Logistic Regression and Random Forest models were built to predict bank customers' deposit subscription behavior.
  • Feature selection techniques such as RFE and RFECV were employed to identify important features.
  • Hyperparameter tuning was performed to optimize the Random Forest model's performance.
  • The best-performing model achieved an accuracy of 71.86% on cross-validation.
  • Further improvements could be made by exploring other machine learning algorithms and conducting more extensive feature engineering.

bank_customer_behaviour's People

Contributors

datasciencevishal 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.