Logo Lanfrica

Big Data Analytics for Customer Behavior Prediction in E-Commerce Platforms in Kenya

Domain:

socioeconomicdigital infrastructure

Record type:

paper
Creator:
PetJoh
Publisher:
Tec
Host:
Big data analytics (BDA) has emerged as a transformative tool for decoding complex consumer behaviour patterns in digital marketplaces. However, its application within the context of emerging African economies, particularly Kenya, remains underexplored despite the rapid expansion of mobile-enabled e-commerce platforms. This study investigated the efficacy of BDA techniques in predicting customer purchase behaviour across Kenyan e-commerce platforms, combining a structured survey of 400 registered online shoppers with transaction log data extracted from three major platforms: Jumia Kenya, Kilimall, and Masoko. Five machine learning algorithms (Logistic Regression, Decision Tree, Random Forest, XGBoost, and Long Short-Term Memory, LSTM) were trained and evaluated using stratified 10-fold cross-validation and a held-out test partition, with a Hybrid Random Forest + XGBoost ensemble achieving the highest test-set classification accuracy of 93.1% (95% CI [83.8%, 97.2%]; F1-score = 92.8%). Key predictors identified through SHAP-based feature importance analysis included purchase frequency, session duration, cart abandonment rate, and M-Pesa transaction size, reflecting the mobile-payment-centric nature of Kenyan consumer behaviour. Platform-level analysis revealed that M-Pesa facilitated over 70% of transactions, and sentiment analysis of customer reviews yielded a positive polarity rate of 62.3% (95% CI [59.5%, 65.0%]). The findings demonstrate that culturally and infrastructurally contextualised BDA models can achieve accuracy levels competitive with those reported in technologically mature markets and provide actionable insights for platform optimisation, personalised recommendation delivery, and customer retention strategy in sub-Saharan digital markets.