This project evaluates and compares the performance of multiple classification models to predict the success of phone-based marketing campaigns for bank term deposit products. Data is from a Portuguese banking institution and is a collection of the results of multiple marketing campaigns. Data was sourced from the UCI Machine Learning repository and more information can be gathered from the CRISP-DM-BANK pdf included. Analysis is completed in this notebook.
The Logistic Regression model, optimized for recall, achieved a 96% recall rate and outperformed all other models in identifying potential customers likely to subscribe to term deposit products. Key drivers of subscription likelihood include macroeconomic conditions, prior customer engagement, and strong seasonal patterns, providing actionable insights for improving future marketing campaigns.
The dataset contains approximately 41,000 records of marketing calls, including attributes such as:
- the marketing target's age, job, marital status, education, credit default status, housing loan status, personal loan status, contact communication type
- temporal data, such as month, day of the week, duration of latest call
- marketing campain data, such as campaign contact number, number of days since last contact, outcome of the previous marketing campaign
- external relevant quarterly indicators, such as employment variation rate, consumer price index, consumer confidence index, euribor 3 month rate, and number of employees
The target variable indicates whether the client subscribed to a term deposit product.
- Cyclical features (month, day of the week): engineered and used in all models except the Decision Tree (which can inherently handle non-linear relationships)
- Categorical features: imputed using the most frequent value, as missingness did not convey meaningful information
- Numeric features: imputed with a constant value (-1) where missingness was either absent or semantically meaningful (ex. pdays representing no prior contact)
- Map target variable feature to 0 and 1 for modeling simplicity
- Baseline Classifier
- Logistic Regression
- K Nearest Neighbors
- Support Vector Machines
- Decision Trees
Initial assessment included various model statistics to determine best default parameter model performance.
- Training time
- Training Accuracy
- Testing Accuracy
- Recall
- Precision
- F1
- ROC AUC
Evaluation of the best model included:
- Recall was selected as the primary evaluation metric, as the goal is to capture all scenarios that lead to a 'yes' decision for the term deposit bank product
- Grid search was performed to optimize hyperparameters with respect to recall
- Dissecting which features were responsible for acheiving the best results
When evaluated using default parameters, most models optimized for overall accuracy, often at the expense of recall and precision (Figure 1). Logistic Regression achieved the highest test accuracy (91%) while also maintaining relatively strong recall (60%) and precision (62%). Although KNN and Decision Tree models demonstrated higher training accuracy, their reduced performance on the test set suggests overfitting.
Given the business objective of identifying as many potential subscribers as possible, recall was prioritized as the primary metric. With only ~10% of customers responding positively, the cost of false negatives (missing a potential subscriber) outweighs the cost of false positives. Therefore, a model that captures the majority of positive responses—even at the expense of precision—provides greater business value by enabling more targeted and efficient marketing efforts.
Given this, hyperparameter optimization was conducted using grid search to discern which hyperparameters would best optimize the models toward a higher recall metric. The recall optimized Logistic Regression model outperformed all other models, achieving a recall of 96% (Figure 2). No other model approached this level of performance, making Logistic Regression the most effective choice for this use case.
A number of strong findings were discovered when digging into the hyperparameter tuned Logistic Regression model that acheived a 96% recall. Most notably, higher employment variation rates (indicative of stronger economic conditions) are associated with a lower likelihood of subscription. Conversely, during weaker economic periods, customers appear more risk averse and more receptive to stable investment products such as term deposits.
A strong seasonal pattern is observed in subscription likelihood. Early months (e.g., March and April) are associated with lower response rates, while later months (e.g., September and October) show increased likelihood of subscription (Figure 3). Day of the week effects are present but significantly weaker, with Wednesday showing a slightly higher likelihood of positive response (Figure 4).
The consumer price index was also observed to be positively correlated to positive responses to the term deposit product offering. This may indicate that customers are more inclined toward stable, low risk returns during periods of rising prices.
Finally, if the customer had been previously contacted, if interest rates are high or the client is a retiree, the response rate to the product increased as well.
The model indicates that macroeconomic conditions, particularly employment trends and interest rates, are the strongest drivers of subscription behavior. Customers are more likely to subscribe during weaker economic periods and when interest rates are higher. Prior customer engagement is also highly predictive, with previously contacted customers and those with successful past interactions showing significantly higher conversion rates. Additionally, a strong seasonal pattern exists by month, while day of the week effects are minimal. Certain customer segments, such as retirees, also demonstrate higher responsiveness. See Figure 5 for other top performing features.
Further analysis is recommended to validate whether the observed monthly patterns reflect true seasonality or are influenced by campaign timing and operational factors (e.g., campaigns concentrated in specific months). If validated, aligning future campaigns with favorable economic conditions and high-performing months (e.g., fall) could significantly improve marketing effectiveness.




