Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🧠 NeuralRetail

AI-Powered Retail Analytics Platform built using Machine Learning, FastAPI, Streamlit, and PostgreSQL.


🚀 Features

📈 Demand Forecasting

  • 30-day sales forecasting
  • Prophet based predictions
  • Forecast visualization
  • Future sales CSV export

👥 Customer Segmentation

  • K-Means clustering
  • Segment visualization
  • Customer grouping analysis

⚠️ Churn Prediction

  • Churn risk scoring
  • SHAP Explainability
  • High-risk customer identification

📦 Inventory Optimization

  • ABC Analysis
  • EOQ Calculation
  • Safety Stock Estimation
  • Reorder Point Prediction

📊 Monitoring Dashboard

  • Drift Monitoring
  • Stockout Alerts
  • Churn Spike Detection
  • KPI Tracking

🛠 Tech Stack

Layer Technology
Backend FastAPI
Dashboard Streamlit
Database PostgreSQL
ML Models Scikit-Learn
Forecasting Prophet
Visualization Matplotlib
Data Processing Pandas
Deployment Streamlit Cloud

📂 Project Structure

NeuralRetail/

├── docs/
├── models/
│   ├── churn.pkl
│   ├── kmeans.pkl
│   ├── prophet.pkl
│   └── scaler.pkl
│
├── reports/
│   ├── abc_chart.png
│   ├── forecast.png
│   ├── future_30_days.csv
│   ├── segments.png
│   └── shap_summary.png
│
├── src/
│   ├── api/
│   │    └── main.py
│   │
│   ├── dashboard/
│   │    └── app.py
│   │
│   ├── forecasting/
│   ├── inventory/
│   ├── churn/
│   ├── segmentation/
│   └── database/
│
├── requirements.txt
├── README.md
└── .gitignore

⚙️ Installation

Clone repository

git clone https://github.com/NipurnCoder/NeuralRetail.git

cd NeuralRetail

Create virtual environment

python -m venv venv

Activate environment

Windows

venv\Scripts\activate

Linux / Mac

source venv/bin/activate

Install dependencies

pip install -r requirements.txt

🗄 Database Setup

Start PostgreSQL

Create database

CREATE DATABASE neuralretail;

Run schema

\i schema.sql

🚀 Run FastAPI

uvicorn src.api.main:app --reload

API

http://127.0.0.1:8000

📊 Run Dashboard

streamlit run src/dashboard/app.py

Dashboard URL

http://localhost:8501

🤖 Machine Learning Models

Model Purpose
KMeans Segmentation
Prophet Forecasting
Random Forest Churn Prediction
EOQ Inventory Planning
ABC Analysis Product Categorization

📷 Dashboard Preview

Overview Dashboard

Forecasting Dashboard

Customer Segmentation

Churn Dashboard

Inventory Optimization

Monitoring Dashboard


🎯 Key Metrics

✔ Forecast Accuracy

✔ Churn AUC

✔ Stockout Reduction

✔ Inventory Savings

✔ Customer Segmentation

✔ Demand Prediction


Future Improvements

  • Docker Deployment
  • CI/CD Pipeline
  • Authentication
  • Kafka Streaming
  • Redis Cache
  • Grafana Monitoring
  • Kubernetes Deployment

Author

NIPURN

B-Tech CSE | AI Engineer | Data Science Enthusiast

LiveDemo: https://neuralretail-qtssqfjelxkmmnlf936c5k.streamlit.app/

GitHub: https://github.com/NipurnCoder


⭐ If you found this project useful, consider giving it a star.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages