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.
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.
- 🎯 Improve marketing efficiency
- 💰 Reduce campaign costs
- 📈 Increase conversion rates
- 👥 Identify potential customers more effectively
- Dataset: Bank Marketing Dataset
- Domain: Banking and Marketing Analytics
- Target Variable: Customer Subscription Status (
Yes/No)
- Age
- Job
- Marital Status
- Education
- Account Balance
- Housing Loan Status
- Personal Loan Status
- Contact Type
- Campaign Information
- Previous Marketing Outcomes
- Other customer-related attributes
| Technology | Purpose |
|---|---|
| Python | Programming Language |
| Pandas | Data Manipulation and Analysis |
| Matplotlib | Data Visualization |
| Seaborn | Statistical Visualizations |
| Scikit-Learn | Machine Learning Modeling |
- 📥 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
✅ 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.
Displays the model's classification performance.
Highlights the most significant factors influencing customer subscriptions.
Provides an interpretable view of the model's decision-making process.
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
Clone the repository:
git clone https://github.com/SriyaPatil/Customer_Purchase_Prediction_Using_Decision_Tree.gitNavigate to the project directory:
cd Customer_Purchase_Prediction_Using_Decision_TreeInstall the required dependencies:
pip install -r requirements.txtRun the Python script:
python Customer_Purchase_Prediction.pyOr explore the project interactively using:
jupyter notebook Customer_Purchase_Prediction.ipynbThe 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 |
- 🌲 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
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.
Sriya Patil
LinkedIn: https://linkedin.com/in/sriya-patil-63240332a