How sohelraja/customer-churn-analysis works
Project Type and Purpose
• This is a data-science pipeline project (Customer-Churn-Analysis) implemented in Jupyter notebooks.
• Purpose: ingest telecom customer data, clean it, explore with Decision Trees, Clustering (Kmodes/Kprototypes), Association Rule Mining (Apriori), select best features, train multiple classifiers, then combine them in a Voting Ensemble to predict churn.
File-Structure Analysis
• Top-level directories map to pipeline stages:
• Datasets – raw and preprocessed CSV/XLSX files
• Decision Tree – notebooks for initial classification & feature importance
• Clustering – notebooks for Kmodes/Kprototypes cluster analysis
• Association Rule Mining – notebooks for Apriori rule extraction
• Ensemble Learning
– Other Classifiers – subfolders for Decision Tree, KNN, Logistic Regression, Naive Bayes, Random Forest, SVC
– Voting Classifier – notebook combining models
• Snapshots – images of workflow, graphs, metrics
• Key configuration: .gitignore for notebook artifacts; no service-oriented or deployment files – it’s an exploratory/analytical pipeline.
Insights from README
• Explicit modeling steps: data collection → preprocessing → Decision Tree → Clustering & Association Rules → feature selection → classifier comparison → voting ensemble → final accuracy & graphs.
a. Main Components
1. Data Sources
– WA_Fn-UseC_-Telco-Customer-Churn.csv (raw)
– new_telco.csv (preprocessed)
2. Data Preprocessing Module
– Jupyter notebooks handling cleaning, dummy encoding
3. Modeling Modules
• Decision Tree Classifier (initial feature ranking)
• Clustering Module (Kmodes & K-prototypes)
• Association Rule Mining Module (Apriori)
4. Feature Selection Component
– Intersection of top features from Decision Tree, Clustering, Association Rules
5. Classifier Modules (Other Classifiers)
– Decision Tree, KNN, Logistic Regression, Naive Bayes, Random Forest, SVC
6. Voting Ensemble Module
– Combines selected classifiers into a final predictor
7. Visualization & Reporting
– Snapshots folder holds graphs, workflow images, accuracy reports
b. Relationships & Data Flows
• Preprocessing → all three modeling modules in parallel
• Each modeling module outputs feature importance/cluster centroids/rules → Feature Selection
• Feature Selection → feeds datasets into each Other Classifier
• Outputs (accuracy metrics) from each classifier → Voting Ensemble
• Final predictions & metrics → Visualization & Reporting
c. Architectural Patterns & Principles
• Pipeline pattern: sequential & parallel stages
• Modularity: each algorithm in its own directory/notebook
• Data-centric flow: single source of truth (preprocessed CSV)
• Separation of concerns: modeling vs. feature selection vs. ensemble
d. Technologies & Libraries
• Jupyter Notebooks (presentation + code)
• Python (pandas, scikit-learn, mlxtend for Apriori, kmodes package)
• Visualization: matplotlib/seaborn (embedded in notebooks)
Detail
• Every high-level stage and its inputs/outputs.
• Modules with core libraries (e.g., scikit-learn) to show tech stack.
• Iterative nature: e.g., after Voting Ensemble, feedback loop could trigger hyperparameter tuning (future scope).