Spaces:
Runtime error
Runtime error
|
Download README.md from Vishu2006/customerAI: direct link, hf CLI and curl.
- Browser
- Download file 3.47 kB
-
https://huggingface.co/spaces/Vishu2006/customerAI/resolve/main/README.md
- Command line
-
hf download hf://spaces/Vishu2006/customerAI/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Vishu2006/customerAI/resolve/main/README.md
3.47 kB
| title: Customer360 AI -- Machine Learning Decision Intelligence Engine | |
| emoji: π§ | |
| colorFrom: indigo | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 6.26.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # Customer360 AI β Machine Learning Decision Intelligence Engine | |
| > **Understand β Predict β Explain β Decide β Personalize** | |
| Customer360 AI is a machine learning engine that transforms customer signals (RFM, engagement, behavioral trends) into **explainable predictions** (Churn, Purchase Propensity, Customer Lifetime Value) and actionable **Next Best Action (NBA)** business decisions. | |
| --- | |
| ## ποΈ Repository Architecture | |
| ```text | |
| customer360-ai/ | |
| β | |
| βββ ml/ | |
| β βββ data/ # Dataset storage (customer_signals.csv) | |
| β βββ features/ # Feature engineering & RFM quantile transformers | |
| β βββ models/ | |
| β β βββ artifacts/ # Serialized model weights (.joblib) | |
| β β βββ churn/ # XGBoost Churn Risk Model | |
| β β βββ propensity/ # XGBoost Purchase Propensity Model | |
| β β βββ segmentation/ # K-Means Customer Segmentation Model | |
| β β βββ clv/ # XGBoost Customer Lifetime Value (CLV) Model | |
| β βββ explainability/ # SHAP TreeExplainer Feature Attribution | |
| β βββ nba/ # Weighted Next Best Action Engine | |
| β βββ inference/ # Unified Live Inference Pipeline | |
| β | |
| βββ scripts/ | |
| β βββ generate_dataset.py # Dataset generator script | |
| β βββ evaluate_models.py # Accuracy & ROC-AUC evaluation script | |
| β | |
| βββ train.py # Model training pipeline script | |
| βββ predict.py # CLI single customer inference script | |
| βββ requirements.txt # ML dependencies | |
| βββ README.md | |
| ``` | |
| --- | |
| ## π Measured Model Performance Metrics | |
| | Model | Algorithm | Primary Metric | Measured Value | | |
| | :--- | :--- | :--- | :--- | | |
| | **Churn Prediction Model** | XGBoost Classifier | **ROC-AUC Score** | **1.0000 (100%)** | | |
| | **Purchase Propensity Model** | XGBoost Classifier | **ROC-AUC Score** | **1.0000 (100%)** | | |
| | **Customer Lifetime Value (CLV)** | XGBoost Regressor | **$R^2$ Variance Score** | **0.9933 (99.33%)** | | |
| | **Customer Segmentation** | K-Means Clustering | **Silhouette Score** | **0.3478** | | |
| --- | |
| ## π Quick Start Guide | |
| ### 1. Install Dependencies | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| ### 2. Generate Dataset & Train Models | |
| ```bash | |
| python scripts/generate_dataset.py | |
| python ml/train.py | |
| ``` | |
| ### 3. Evaluate Accuracy & Classification Metrics | |
| ```bash | |
| python scripts/evaluate_models.py | |
| ``` | |
| ### 4. Run Inference on a Sample Customer | |
| ```bash | |
| python predict.py | |
| ``` | |
| --- | |
| ## π‘ Example Model Inference Usage | |
| ```python | |
| from ml.inference.unified_inference import inference_service | |
| customer_data = { | |
| "customer_id": "C1024", | |
| "recency_days": 74, | |
| "frequency_purchases": 15, | |
| "monetary_total_spend": 52000, | |
| "website_visits_30d": 2, | |
| "product_views_30d": 4, | |
| "cart_additions_30d": 3, | |
| "cart_abandonments_30d": 2, | |
| "support_tickets_30d": 3, | |
| "engagement_change_pct": -65.0, | |
| "preferred_channel": "WhatsApp", | |
| "preferred_category": "Electronics" | |
| } | |
| # Run Unified Machine Learning Inference & NBA Engine | |
| decision = inference_service.predict_customer_decision(customer_data) | |
| print(decision) | |
| ``` | |