Skip to content

SriyaPatil/Customer_Purchase_Prediction_Using_Decision_Tree

Repository files navigation

🏦 Customer Purchase Prediction Using Decision Tree

📌 Project Overview

This project leverages a Decision Tree Classifier to predict whether a customer is likely to subscribe to a bank product based on demographic and marketing campaign data. By analyzing customer behavior and historical campaign outcomes, the model helps identify potential customers more effectively, enabling data-driven marketing decisions.


🎯 Problem Statement

Banks often conduct marketing campaigns to promote financial products. However, reaching out to every customer can be both costly and inefficient.

The objective of this project is to build a Machine Learning model that predicts whether a customer will subscribe to a bank product based on historical customer data.

Business Benefits:

  • 🎯 Improve marketing efficiency
  • 💰 Reduce campaign costs
  • 📈 Increase conversion rates
  • 👥 Identify potential customers more effectively

📊 Dataset Information

  • Dataset: Bank Marketing Dataset
  • Domain: Banking and Marketing Analytics
  • Target Variable: Customer Subscription Status (Yes / No)

Features Included:

  • Age
  • Job
  • Marital Status
  • Education
  • Account Balance
  • Housing Loan Status
  • Personal Loan Status
  • Contact Type
  • Campaign Information
  • Previous Marketing Outcomes
  • Other customer-related attributes

🛠️ Technologies Used

Technology Purpose
Python Programming Language
Pandas Data Manipulation and Analysis
Matplotlib Data Visualization
Seaborn Statistical Visualizations
Scikit-Learn Machine Learning Modeling

⚙️ Project Workflow

  • 📥 Data Loading and Exploration
  • 🧹 Data Preprocessing and Feature Encoding
  • 🔀 Train-Test Data Splitting
  • 🌳 Decision Tree Model Training
  • 📊 Model Evaluation
  • 🔍 Feature Importance Analysis
  • 🌲 Decision Tree Visualization
  • 📈 Performance Analysis and Insights

📈 Results and Key Insights

✅ Successfully developed a Decision Tree Classification Model for customer purchase prediction.

✅ Evaluated model performance using:

  • Accuracy Score
  • Confusion Matrix
  • Classification Report

✅ Identified the most influential features affecting customer subscription decisions.

✅ Demonstrated how Machine Learning can support targeted marketing strategies and improve business decision-making.


📷 Visualizations

Confusion Matrix

Displays the model's classification performance.

![Confusion Matrix](images/confusion_matrix.png)

Feature Importance Analysis

Highlights the most significant factors influencing customer subscriptions.

![Feature Importance](images/feature_importance.png)

Decision Tree Visualization

Provides an interpretable view of the model's decision-making process.

![Decision Tree](images/decision_tree.png)

📂 Project Structure

Customer_Purchase_Prediction_Using_Decision_Tree/
│
├── Customer_Purchase_Prediction.py
├── Customer_Purchase_Prediction.ipynb
├── bank-full.csv
├── README.md
├── requirements.txt
│
└── outputs/
    ├── confusion_matrix.png
    ├── feature_importance.png
    └── decision_tree.png

🚀 Installation

Clone the repository:

git clone https://github.com/SriyaPatil/Customer_Purchase_Prediction_Using_Decision_Tree.git

Navigate to the project directory:

cd Customer_Purchase_Prediction_Using_Decision_Tree

Install the required dependencies:

pip install -r requirements.txt

▶️ How to Run the Project

Run the Python script:

python Customer_Purchase_Prediction.py

Or explore the project interactively using:

jupyter notebook Customer_Purchase_Prediction.ipynb

📌 Generated Outputs

The project generates the following output files:

File Name Description
confusion_matrix.png Confusion Matrix Visualization
feature_importance.png Feature Importance Plot
decision_tree.png Decision Tree Visualization

🔮 Future Improvements

  • 🌲 Implement Random Forest Classifier
  • ⚡ Experiment with XGBoost Classifier
  • 🎯 Perform Hyperparameter Tuning
  • 🔄 Apply Cross-Validation Techniques
  • 🧠 Explore Feature Engineering Approaches
  • 📉 Incorporate ROC Curve Analysis
  • 🌐 Deploy the model using Streamlit or Flask

📝 Conclusion

This project demonstrates the end-to-end application of a Decision Tree Classifier for predicting customer purchase behavior using the Bank Marketing Dataset.

The combination of predictive modeling, feature importance analysis, and model visualization provides valuable business insights that can help organizations optimize their marketing efforts and improve customer targeting strategies.


👨‍💻 Author

Sriya Patil

🔗 Connect with Me

LinkedIn: https://linkedin.com/in/sriya-patil-63240332a


About

Machine Learning project for predicting customer purchase behavior using a Decision Tree Classifier on the Bank Marketing Dataset with data preprocessing, feature importance analysis, confusion matrix visualization, and decision tree interpretation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors