Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ING Hubs Türkiye Datathon 2025 – Customer Churn Prediction

Competition Overview

The ING Hubs Türkiye Datathon 2025 challenged participants to predict customer churn probability within a 6-month window following a reference date.

The evaluation used a custom composite metric:

Metric Weight
Gini Coefficient 40%
Recall@10% 30%
Lift@10% 30%

Each metric was normalized against a baseline model's performance.

Dataset

The data consists of 4 CSV files (not included in this repo due to size):

File Description Size
referance_data.csv Training set: cust_id, ref_date, churn label ~2.5 MB
referance_data_test.csv Test set: cust_id, ref_date (no label) ~750 KB
customers.csv Demographics: gender, age, province, work info, tenure ~7 MB
customer_history.csv Monthly transaction history per customer ~215 MB

Note: Download the dataset from Kaggle – ING Hubs Türkiye Datathon and place the CSV files in the ing-hubs-turkiye-datathon/ directory.

Project Structure

ING Datathon/
├── analysis.ipynb                  # Main analysis notebook with full pipeline
├── README.md                       # This file
├── .gitignore                      # Git ignore rules
├── submission.csv                  # Final predictions for submission
└── ing-hubs-turkiye-datathon/      # Data directory (not in repo)
    ├── customer_history.csv
    ├── customers.csv
    ├── referance_data.csv
    ├── referance_data_test.csv
    └── sample_submission.csv

Analysis Pipeline

Our analysis.ipynb notebook follows these steps:

  1. Data Loading – Read and inspect all 4 datasets
  2. EDA – Churn distribution, missing values, demographic analysis, correlations
  3. Feature Engineering – Create 60 features from customer history and demographics
  4. Model Training – CatBoost classifier with 5-fold cross-validation
  5. Evaluation – Custom competition metric and feature importance
  6. Submission – Generate predictions for test set

Results

Model Performance (5-Fold CV)

  • Overall Score: 1.15203 (Competition metric)
  • Gini Coefficient: 0.43024
  • Recall@10%: 0.21712
  • Lift@10%: 2.17112
  • ROC AUC: 0.71512

Fold Scores

  • Fold 1: 1.17355
  • Fold 2: 1.13336
  • Fold 3: 1.14939
  • Fold 4: 1.14294
  • Fold 5: 1.15778
  • Mean: 1.15140 ± 0.01366

Submission

  • Test Samples: 43,006
  • Prediction Range: 0.00038 - 0.41299
  • Mean Prediction: 0.12624

Top 10 Feature Importance

  1. overall_active_product_category_nbr_min (9.91%)
  2. overall_active_product_category_nbr_mean (8.98%)
  3. overall_active_product_category_nbr_max (7.34%)
  4. last6m_active_product_category_nbr_sum (6.81%)
  5. last6m_active_product_category_nbr_mean (6.72%)
  6. last6m_active_product_category_nbr_min (6.08%)
  7. last6m_active_product_category_nbr_max (3.93%)
  8. overall_active_product_category_nbr_sum (2.68%)
  9. overall_mobile_eft_all_cnt_std (2.45%)
  10. overall_active_product_category_nbr_std (2.32%)

Key Insights

  • Churn Rate: 14.16% of customers churned in the dataset
  • Best Predictors: Product category activity features are most important
  • Model: CatBoost performed well with good generalization across folds
  • Business Impact: Model can identify high-risk customers for retention strategies
  1. Feature Engineering – RFM-inspired features with overall and last-6-month aggregations
  2. Model Training – CatBoost with 5-fold stratified cross-validation
  3. Feature Importance – Identify key churn predictors
  4. Submission – Generate predictions for the test set

Getting Started

Prerequisites

  • Python 3.8+
  • Required packages: pandas, numpy, matplotlib, seaborn, scikit-learn, catboost

Installation

pip install pandas numpy matplotlib seaborn scikit-learn catboost

Running the Analysis

  1. Clone this repository
  2. Download the competition data and place CSVs in ing-hubs-turkiye-datathon/
  3. Open and run analysis.ipynb

Competition Commentary

Key Insights

  • Feature engineering was king: The majority of the winning team's effort went into crafting meaningful features. A well-engineered feature set with a default CatBoost model could already achieve a private score of ~1.25.
  • RFM framework: Breaking down Recency, Frequency, and Monetary metrics into granular sub-features, especially focusing on the last 6 months, proved highly effective.
  • Ensemble for the win: The final 1st place submission used AutoGluon's ensemble approach, but the marginal improvement from complex modeling was small compared to feature engineering gains.
  • "Garbage in, garbage out": Correct handling of missing data and understanding domain-specific patterns (e.g., no credit card transactions = no credit card usage) was crucial.

Lessons Learned

  1. Invest time in understanding the data before modeling
  2. The prediction window (6 months) should guide feature engineering decisions
  3. Custom eval metrics matter – optimize for what the competition actually measures
  4. Simple well-tuned models can be competitive with complex ensemble approaches

This project is a simplified and cleaned version of the 1st place competition solution, designed for clarity and educational purposes.

About

Customer churn prediction project using Python, Jupyter Notebook, and scikit-learn. Analysis for ING Datathon 2025 dataset.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages