This project analyzes a Portuguese banking institution's marketing campaigns to predict whether a client will subscribe to a term deposit. The analysis compares the performance of various machine learning classifiers (K-Nearest Neighbors, Logistic Regression, Decision Trees, and Support Vector Machines) to identify the most effective model for predicting customer subscription behavior.
You can view the detailed analysis in the Jupyter Notebook.
The dataset comes from the UCI Machine Learning repository and contains information about:
- Client demographics (age, job, marital status, education)
- Campaign information (contact type, month, day, duration)
- Previous campaign outcomes
- Economic indicators
- Decision Tree emerged as the best performer with ROC-AUC score of 0.759
- KNN showed high accuracy (89.5%) but lower ROC-AUC
- Logistic Regression demonstrated stable but lower overall performance
The most influential features for predicting term deposit subscription were:
- Previous campaign outcome
- Age and age groups
- Marital status
- Contact type
- Month of contact
- Success rates vary significantly by month
- Previous contact outcomes strongly influence success probability
- Age and marital status are key demographic factors
-
Timing:
- Focus campaigns during months with historically higher success rates
- Optimize contact timing based on day-of-week patterns
-
Customer Targeting:
- Prioritize customers with positive previous interactions
- Focus on age groups showing higher conversion rates
- Tailor approach based on marital status and job type
-
Process Improvements:
- Implement real-time prediction system using Decision Tree model
- Monitor and update model periodically
- Consider collecting additional relevant features
bank_campaigns.ipynb
: Main Jupyter notebook containing analysisbanking.py
: Python script with model implementationimages/
: Directory containing visualization plots- Feature importance plot
- Decision tree visualization
- ROC curves comparison
- Distribution plots
- Python 3.x
- Required packages:
- pandas
- numpy
- scikit-learn
- matplotlib
- seaborn
- Clone the repository
- Install required packages:
pip install -r requirements.txt
- Run the Jupyter notebook:
jupyter notebook bank_campaigns.ipynb
-
Technical Implementation:
- Deploy model as API for real-time predictions
- Create dashboard for campaign performance monitoring
- Set up automated model retraining pipeline
-
Business Integration:
- Train marketing team on model insights
- Develop targeted scripts based on key features
- Set up A/B testing framework
Tyler Scharf https://www.linkedin.com/in/tylerscharf
This project is licensed under the MIT License - see the LICENSE file for details.