A full-stack data science project that forecasts customer sales and predicts churn using machine learning, visual analytics, and interactive dashboards. This project is containerized with Docker and production-ready with a REST API built using FastAPI.
Data Cleaning & PreprocessingExploratory Data Analysis (EDA)Feature Engineering & Customer SegmentationPredictive Modeling (Sales Forecasting & Churn Prediction)Model Evaluation & SelectionInteractive Dashboard using StreamlitREST API using FastAPI for model servingDockerized for easy deployment
- Handled missing values, outliers, and feature encoding
- Scaled features for modeling
- Visualized sales trends, customer segments, and patterns
- Grouped insights by product, region, and customer
- Created new insightful features
- Applied KMeans clustering for segmentation
- Visualized clusters using heatmaps and elbow curves
- Built and compared multiple models (RandomForest, XGBoost, etc.)
- Selected best model based on performance metrics
- Saved model with
joblib
- Built an interactive dashboard to visualize insights and make predictions
- Integrated trained model with Streamlit interface
- Created a FastAPI backend for real-time prediction
- Dockerized the API for scalable deployment
| Category | Tools/Technologies |
|---|---|
| Data Processing | Pandas, NumPy |
| Visualization | Matplotlib, Seaborn, Plotly |
| Machine Learning | Scikit-learn, XGBoost, KMeans |
| Dashboard | Streamlit |
| Backend API | FastAPI, Uvicorn |
| Model Serving | joblib |
| Containerization | Docker |
| Version Control | Git + GitHub |
- Python 3.10+
- Docker installed and running
Navigate to your desired folder and run:
git clone https://github.com/msaakaash/customer-sales-forecasting.git
cd customer-sales-forecasting
-
Windows:
python -m venv venv && venv\Scripts\activate -
macOS/Linux:
python3 -m venv venv && source venv/bin/activate
Install all required Python packages:
pip install -r api/requirements.txt
Launch the interactive dashboard:
streamlit run streamlit_app.py
Visit http://localhost:8501
cd api
docker build -t churn-api .
docker run -p 8000:8000 churn-api
Visit http://localhost:8000/docs for interactive Swagger docs.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Please read our Code of Conduct before contributing to this project.
If you discover a vulnerability, please refer to our Security Policy for instructions on how to report it responsibly.
This project is licensed under the MIT License.