Analyzing Customer Spending Based on Transactional Data Using the Random Forest Algorithm
Main Article Content
Abstract
This study explores customer spending behavior using transactional data from a retail dataset, employing a Random Forest Regressor to predict the total amount spent by customers. The dataset includes various customer attributes such as age, gender, and product category, alongside transactional details including quantity purchased and price per unit. Through Exploratory Data Analysis (EDA), it was found that Price and Quantity were the most significant factors influencing total spending, with other features like Age, Gender, and Product Category playing a minimal role in predicting spending behavior. The model achieved perfect accuracy, with an R-squared value of 1.000, indicating that it explained all the variance in customer spending. The findings suggest that transactional features, particularly Price and Quantity, are the key drivers of customer spending, and retailers can optimize their marketing and sales strategies by focusing on these factors. This study also highlights the importance of data preprocessing and feature engineering in enhancing model performance, though the results were limited by the lack of external and behavioral features. Future research could further explore the impact of customer loyalty, external factors, and more complex algorithms to improve predictive accuracy.
Article Details

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with International Journal for Applied Information Management agree to the following terms: Authors retain copyright and grant the International Journal for Applied Information Management right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC BY-SA 4.0) that allows others to share (copy and redistribute the material in any medium or format) and adapt (remix, transform, and build upon the material) the work for any purpose, even commercially with an acknowledgement of the work's authorship and initial publication in International Journal for Applied Information Management. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in International Journal for Applied Information Management. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).