Optimizing Random Forest Models with Snake Optimization Algorithm for Predicting E-commerce User Purchase Behaviour
Abstract
This study proposes a Snake Optimization-based Random Forest (SO-RF) model for predicting ecommerce user behavior. Key user interaction metrics, including browsing records, purchase history, search keywords, click rate, dwell time, add-to-cart times, user comments, and visit time, serve as input features, while user conversion rate and purchase rate are the target metrics. The dataset undergoes preprocessing and feature engineering to extract meaningful patterns. The Snake Optimization (SO) algorithm fine-tunes the hyperparameters of the Random Forest (RF) model, enhancing predictive performance and generalization. Experimental results demonstrate that SO-RF outperforms conventional RF, Simulated Annealing-based RF (SA-RF), and Sparrow Search Algorithm-based RF (SSA-RF) on the test set, achieving an MAE of 0.31959, MAPE of 1.6652, MSE of 0.17625, RMSE of 0.41983, and R² of 0.96678. These findings provide valuable insights for e-commerce platforms, enabling personalized marketing strategies, improved user experience, and enhanced sales performance through accurate behavior prediction.DOI:
https://doi.org/10.31449/inf.v49i2.7759Downloads
Published
How to Cite
Issue
Section
License
Authors retain copyright in their work. By submitting to and publishing with Informatica, authors grant the publisher (Slovene Society Informatika) the non-exclusive right to publish, reproduce, and distribute the article and to identify itself as the original publisher.
All articles are published under the Creative Commons Attribution license CC BY 3.0. Under this license, others may share and adapt the work for any purpose, provided appropriate credit is given and changes (if any) are indicated.
Authors may deposit and share the submitted version, accepted manuscript, and published version, provided the original publication in Informatica is properly cited.







