---
# 1. Introduction
### Dataset Overview
The **Bank Marketing Dataset** is one of the most widely cited real-world benchmarks for customer analytics and direct-marketing classification. It documents telephone-based marketing campaigns conducted by a major **Portuguese retail bank** between **2008 and 2010**. Each record represents a single call attempt to an existing or prospective client, with the primary objective of predicting whether the client will subscribe to a **term deposit** — a fixed-term savings product with higher interest rates than standard deposits.
We use the **extended version** of the dataset (`bank-additional-full.csv`), which contains:
| Attribute | Value |
|-----------|-------|
| **Instances** | 41,188 client contacts |
| **Input Features** | 20 (demographic, financial, campaign, and macroeconomic) |
| **Target Variable** | `y` — term deposit subscription (`yes` / `no`) |
| **Class Balance** | ~11.3% positive (`yes`), ~88.7% negative (`no`) — highly imbalanced |
### Feature Breakdown
| Category | Features | Description |
|----------|----------|-------------|
| **Demographic** | `age`, `job`, `marital`, `education` | Client age, occupation, marital status, and highest education level |
| **Financial Profile** | `default`, `housing`, `loan` | Credit default history, housing loan, personal loan |
| **Campaign Contact** | `contact`, `month`, `day_of_week`, `duration`, `campaign`, `pdays`, `previous`, `poutcome` | Communication channel, month/day of last contact, call duration (seconds), contacts in current campaign, days since prior contact, prior contact count, outcome of previous campaign |
| **Macroeconomic** | `emp.var.rate`, `cons.price.idx`, `cons.conf.idx`, `euribor3m`, `nr.employed` | Employment variation rate, consumer price/confidence indices, euribor 3-month rate, number of employees |
| **Target** | `y` | Whether the client subscribed to a term deposit |
> **Important:** The `duration` feature is known to cause **data leakage** if used for predictive modeling before a call is made, because its value is only known after the call ends. We explicitly drop it during preprocessing to ensure realistic, deployable models.
### Data Source & Citation
- **Primary Source:** [UCI Machine Learning Repository — Bank Marketing (ID 222)](https://archive.ics.uci.e...)
- **Original Paper:** Moro, S., Cortez, P., & Rita, P. (2014). *A data-driven approach to predict the success of bank telemarketing*. Decision Support Systems, 62, 22–31.
- **Alternative Mirror:** [Kaggle — Bank Marketing Dataset](https://www.kaggle.com/da...)
The dataset was collected from a Portuguese banking institution's direct-marketing telephone campaigns. The bank's goal was to reduce campaign costs by identifying clients most likely to subscribe before placing a call, thereby minimizing wasted contact effort and improving ROI.
### Domain Motivation & Business Context
**Why this problem matters:**
1. **Cost Efficiency:** Telemarketing campaigns are expensive. Each call consumes agent time, infrastructure, and client goodwill. If a model can segment clients by propensity to subscribe, the bank can focus resources on high-likelihood prospects, dramatically reducing cost-per-acquisition.
2. **Customer Experience:** Repeated, irrelevant calls lead to contact fatigue and brand erosion. Intelligent targeting improves client satisfaction by contacting only those with genuine interest or receptive profiles.
3. **Revenue Growth:** Term deposits represent stable, low-risk funding for banks. Increasing subscription rates directly strengthens the bank's deposit base and lending capacity.
4. **Actionable Segmentation:** Beyond binary prediction, clustering reveals distinct client personas (e.g., "young professionals with savings potential," "pre-retirees seeking security," "price-sensitive clients in downturns"). These segments enable tailored messaging, product bundling, and channel selection.
5. **Macroeconomic Sensitivity:** Subscription rates correlate with economic indicators (interest rates, employment). Understanding how macroeconomic context interacts with client profiles allows the bank to time campaigns strategically.
**In this study**, we go beyond simple classification. We apply **K-Medoid clustering** to discover natural client segments, **hierarchical clustering** to understand nested segment relationships, a **fuzzy logic inference system** to produce interpretable subscription-likelihood scores for agents, and a **genetic algorithm** to optimize which features drive the best clustering quality. Together, these techniques provide a comprehensive, actionable data-mining pipeline for real-world marketing operations.