Data rows
—
Available after an original CSV is inspected.
Dataset-first Python AI/ML project
A guarded project workspace for an executable Python pipeline: inspect the real retail schema first, then run only the analytics, prediction, recommendation, and explanation modules your dataset can truthfully support.
Data rows
—
Available after an original CSV is inspected.
Columns
—
No schema has been assumed.
Missing cells
—
Calculated from the actual uploaded file.
Duplicate rows
—
Exact duplicate detection runs at inspection time.
Upload the original CSV to inspect its real schema in this workspace. The accompanying Python pipeline accepts both CSV and Excel files when you run it locally.
Drop one CSV file here or choose it above
No customer or purchase metrics are assumed before inspection.
Start by selecting the original retail CSV. This project will map only columns it can actually find and will clearly flag any unavailable AI/ML module.
Executable pipeline readiness
The local Python implementation saves genuine figures, metrics, tables, SHAP artifacts, and a final report only when its prerequisite columns and data sufficiency checks pass.
Builds recency, frequency, monetary value, average order value, quantity, product diversity, and purchase cadence at customer level.
Requires customer, date, and transaction value signals.
Selects an appropriate K-Means cluster count using elbow and silhouette diagnostics, then derives human-readable segment labels from cluster behavior.
Requires the customer behavior feature dataset.
Creates a future-inactivity target from the transaction timeline and compares Logistic Regression, Random Forest, and XGBoost without data leakage.
Requires customer transactions over enough time.
Uses Apriori association rules for market baskets and, where interactions allow, an item-based collaborative filtering signal for recommendations.
Requires a product field plus a transaction ID or customer-date basket key.
Applies SHAP to the selected churn model and saves global importance, a SHAP summary, and a real individual-customer explanation.
Depends on a viable time-based churn model; no explanations are fabricated.
Local execution
Use the included retail_xai_pipeline.py script with your original dataset. It supports CSV and Excel input, writes outputs to a folder you choose, and records skipped modules and limitations in the generated report.
python retail_xai_pipeline.py --input your_retail_dataset.csv --output outputsModel safety: churn labels use a temporal split, and model comparison is skipped rather than faked when the data cannot form both classes.
Business output: the final customer intelligence table joins supported segments, churn risk, and recommendations without filling unsupported columns with fabricated values.