{"id":30297048,"url":"https://github.com/dpb24/customer-churn","last_synced_at":"2025-08-17T03:10:08.177Z","repository":{"id":304617611,"uuid":"1019319961","full_name":"dpb24/customer-churn","owner":"dpb24","description":"🌐 Predicting Customer Churn with Decision Tree, XGBoost \u0026 Neural Network Models on the Cell2Cell Dataset","archived":false,"fork":false,"pushed_at":"2025-07-14T09:46:18.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-14T09:55:38.085Z","etag":null,"topics":["churn-analysis","churn-prediction","confusion-matrix","decision-tree-classifier","keras-neural-networks","predictive-analytics","shap-analysis","tensorflow","xgboost-classifier"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpb24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-14T06:36:27.000Z","updated_at":"2025-07-14T09:46:21.000Z","dependencies_parsed_at":"2025-07-14T09:55:47.358Z","dependency_job_id":null,"html_url":"https://github.com/dpb24/customer-churn","commit_stats":null,"previous_names":["dpb24/customer-churn"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dpb24/customer-churn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb24%2Fcustomer-churn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb24%2Fcustomer-churn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb24%2Fcustomer-churn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb24%2Fcustomer-churn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpb24","download_url":"https://codeload.github.com/dpb24/customer-churn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb24%2Fcustomer-churn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270800455,"owners_count":24648177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["churn-analysis","churn-prediction","confusion-matrix","decision-tree-classifier","keras-neural-networks","predictive-analytics","shap-analysis","tensorflow","xgboost-classifier"],"created_at":"2025-08-17T03:10:07.118Z","updated_at":"2025-08-17T03:10:08.165Z","avatar_url":"https://github.com/dpb24.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 Customer Churn Prediction: Cell2Cell Dataset \u003cbr\u003e\n\n**Libraries:** `scikit-learn`, `matplotlib`, `seaborn`, `XGBoost`, `TensorFlow`, `SHAP`\u003cbr\u003e\n**Dataset:** [Cell2Cell Churn Dataset](https://www.kaggle.com/datasets/jpacse/datasets-for-churn-telecom/data) \u003cbr\u003e \u003cbr\u003e\n\nIn this project, we explore the Cell2Cell dataset and build three supervised machine learning models - **Decision Tree**, **XGBoost**, and a **Neural Network** (TensorFlow) — to predict customer churn risk. The workflow includes feature engineering, model tuning, performance evaluation, and SHAP-based interpretability. \u003cbr\u003e\n\n## 🧠 Analytical Approach\n - **Feature engineering** with tenure, billing, call usage, and derived behavioural indicators\n - **Categorical Optimisation**  via native support in XGBoost and embedding layers in the neural network\n - **Model Evaluation** using accuracy, precision, recall, and $F_1$ score on both validation and test sets\n - **Global Interpretability** through SHAP to compare feature importance across architectures\n - **Confusion Matrix Analysis** to diagnose prediction trade-offs and guide threshold tuning \u003cbr\u003e \u003cbr\u003e\n\n## 📊 Results\n - **XGBoost** emerged as the top-performing model, with validation recall of **75.1%** and a stable $F_1$ score of **0.495** on test data\n - **Neural Network** achieved higher validation accuracy but struggled with recall, indicating overfitting to the majority class\n - **SHAP analysis** revealed consistently influential features across models\n - **Confusion matrix analysis** highlighted a recall-focused strategy: most churners were correctly flagged, though false positives remained substantial\n\n## 🔮 Next Steps\n - Refine the Neural Network with dropout, class weighting, and early stopping to improve recall\n - Extend SHAP analysis\n\n\n📖 Jupyter Notebook: [GitHub](notebooks/cell2cell_customer_churn_v1.ipynb) | [CoLab](https://colab.research.google.com/drive/19w02yTrKmPHFSv-OwqHzBjbYtv3l_t-N) \u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"visuals/shap_feature_comparison.png\" width=\"800\"/\u003e\n \u003cimg src=\"visuals/xgboost-confusion_matrix.png\" width=\"800\"/\u003e \n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb24%2Fcustomer-churn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpb24%2Fcustomer-churn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb24%2Fcustomer-churn/lists"}