How rapolupavans/ann_classification_churn works
Project type and purpose
• From the file tree and minimal README title (“ANN_Classification_Churn”), we see this is an end-to-end machine-learning churn-prediction application built in Python.
• Major activities: data exploration & preprocessing (CSV + Jupyter notebooks), model training (Keras ANN), artifact serialization (model.h5, pickled encoders/scalers), and runtime serving (app.py).
Main components
a. Development Environment
• .devcontainer/devcontainer.json (defines a reproducible Docker-based workspace)
• requirements.txt (Python dependencies: Flask, TensorFlow/Keras, scikit-learn, pandas, etc.)
b. Data Sources & Artefacts
• Churn_Modelling.csv (raw data)
• model.h5 (trained ANN weights)
• scaler.pkl, label_encoder_gender.pkl, onehot_encoder_geo.pkl (preprocessing artifacts)
c. Experimentation & Training Pipeline
• experiments.ipynb (EDA, feature engineering, model training)
• prediction.ipynb (model evaluation, inference examples)
d. Model Serving / Inference
• app.py (Flask or FastAPI web service that loads the .h5 model and pickles, exposes a prediction endpoint)
Relationships & data flow
• Raw CSV → experiments.ipynb: data cleaning, preprocessing, train/validate split
• experiments.ipynb → model.h5 & pickle files: artifact creation
• model artifacts + app.py + requirements → Docker container (as defined in .devcontainer)
• Client request (HTTP JSON) → app.py → load pickle encoders & scaler, preprocess input → load Keras model → predict churn → JSON response back to client
Architectural patterns & design principles
• Separation of concerns:
• Experimentation/training notebooks are isolated from serving code.
• Preprocessing logic is serialized into reusable artifacts (scaler, encoders).
• Reproducibility: devcontainer + requirements.txt ensure environment consistency.
• Lightweight serving: Flask app focuses solely on loading artifacts and inference.
Elements to capture in detail
• All artifact files (model.h5, .pkl files) and their roles in preprocessing/inference
• The CSV as your sole raw data source
• Jupyter notebooks as training/exploration modules (not part of runtime)
• The Flask service (app.py) as the inference endpoint
• Environment definition (.devcontainer/devcontainer.json)
Putting it all together
• Top-left: Data Source (Churn_Modelling.csv)
• Far-right: Client (could be Postman, web frontend, or another service) sending requests to app.py and receiving churn predictions