Retail and e-commerce businesses now accumulate enormous quantities of transaction, demographic, preference, and behavioral records. Manual review and fixed reports cannot easily turn such multi-dimensional data into usable insight, so firms find it hard to discover distinct customer groups, forecast buying patterns, and offer individually relevant products. Isolated statistical or machine learning scripts address only part of the problem; without one system that joins database queries, prediction, recommendation, natural-language assistance, and business intelligence, non-technical decision-makers rarely adopt them. We present ShopAI, an integrated machine learning and AI decision-support platform for customer shopping behavior. It brings together exploratory data analysis (EDA), SQL querying, unsupervised segmentation, supervised prediction, contextaware recommendation, and interactive visualization. Customers are grouped by K-Means clustering (K = 4) using age, purchase amount, review rating, previous purchases, purchase frequency, and discount usage, and Principal Component Analysis (PCA) maps the scaled features to three dimensions so the clusters can be inspected visually. A Random Forest Classifier estimates how likely a customer is to subscribe, and a Gradient Boosting Regressor forecasts purchase amount from demographic, seasonal, and transactional inputs. A custom feature engineering stage adds purchase frequency in days, age group, estimated annual spending, loyalty tier, subscriber indicator, and discount indicator. A PostgreSQL layer answers business questions on revenue by gender, discount sensitivity, loyalty, and product rankings. A hybrid Product Recommendation Engine combines gender, category, season, and K-Means cluster to return top-ranked items with numeric match scores and plain-language reasons, while an AI Shopping Behavior Copilot with a Marketing Strategy Synthesizer replies to naturallanguage questions using the underlying data. The system was built in Python (Pandas, NumPy, Scikit-learn, Joblib, Matplotlib, Seaborn, Plotly) on 3,900 customer shopping records, and is delivered as a Streamlit web application together with an executive Power BI dashboard. Checks covering 9 reusable model artifacts and 13 test cases show that the platform combines descriptive, predictive, and prescriptive analytics, helping analysts and marketing managers improve retention, targeting, and sales
No takes yet. Share an insight, caveat, or question.
Nale et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: