A Machine Learning Model for Local Market Prediction Using RFM Model

Muhammad Yahya, Universitas Negeri Makassar, Indonesia
Jumadi Mabe Parenreng, Universitas Negeri Makassar, Indonesia
Fathahillah Fathahillah, Universitas Negeri Makassar, Indonesia
Abdul Wahid, Universitas Negeri Makassar, Indonesia
M. Syahid Nur Wahid, Universitas Negeri Makassar, Indonesia
Muhammad Fajar B, Universitas Negeri Makassar, Indonesia


This study explores the application of machine learning for local market prediction in e-commerce. By leveraging the RFM segmentation method, the model predicts product sales based on user shopping patterns. The RFM score, calculated using recency, frequency, and monetary values of customer purchases, segments customers into distinct categories. The research utilizes a dataset obtained through seven parameters and performs data preprocessing. K-Means clustering then classifies customers into Low, Medium, and High levels based on their RFM scores. Customers in the Low category exhibit low purchase activity but high product browsing. The Medium segment displays consistent purchases of a limited product range. High-level customers demonstrate frequent purchases with significant spending. The identified customer segments enable targeted marketing strategies. For Low-level customers, discounts or product feature promotions can incentivize purchases. Combining product offerings can entice Medium-level customers to explore new products. Finally, High-level customers can be engaged through loyalty programs offering rewards. This approach empowers e-commerce sellers to tailor marketing strategies for each customer segment, enhancing market dominance.


RFM; K-Means; Data Mining; E-Commerce

Full Text:



C. Kleisiari, M.-N. Duquenne, and G. Vlontzos, “E-Commerce in the Retail Chain Store Market: An Alternative or a Main Trend?,” Sustainability, vol. 13, no. 8, p. 4392, Apr. 2021, doi: 10.3390/su13084392.

I. O. Pappas, “User experience in personalized online shopping: a fuzzy-set analysis,” EJM, vol. 52, no. 7/8, pp. 1679–1703, Jun. 2018, doi: 10.1108/EJM-10-2017-0707.

N. H. Bur, I. Asfah, and A. Wahid, “Analysis of The Application of Market Digitalization at Kampung Baru Public Market Makassar City,” 2023.

V. Babenko, Z. Kulczyk, I. Perevosova, O. Syniavska, and O. Davydova, “Factors of the development of international e-commerce under the conditions of globalization,” SHS Web Conf., vol. 65, p. 04016, 2019, doi: 10.1051/shsconf/20196504016.

D. Voramontri and L. Klieb, “Impact of social media on consumer behaviour,” IJIDS, vol. 11, no. 3, p. 209, 2019, doi: 10.1504/IJIDS.2019.101994.

M. Molinaro, P. Romano, M. Battistutta, and G. D. Re, “An interactive DSS to improve decision-making in the (r,Q) policy,” IFAC-PapersOnLine, vol. 52, no. 13, pp. 1438–1443, 2019, doi: 10.1016/j.ifacol.2019.11.401.

M. Yahya, J. M. Parenreng, F. Fathahillah, M. S. N. Wahid, M. Fajar B, and A. Wahid, “A Decision Support System to Determine the Familiy’s Economic Status for Certificate of The Low-Income Household Using MAUT Method,” ISI, vol. 7, no. 2, p. 185, Nov. 2022, doi: 10.35314/isi.v7i2.2439.

Z. Yang, Y. Shi, B. Wang, and H. Yan, “Website Quality and Profitability Evaluation in Ecommerce Firms Using Two-stage DEA Model,” Procedia Computer Science, vol. 30, pp. 4–13, 2014, doi: 10.1016/j.procs.2014.05.375.

J. Alzubi, A. Nayyar, and A. Kumar, “Machine Learning from Theory to Algorithms: An Overview,” J. Phys.: Conf. Ser., vol. 1142, p. 012012, Nov. 2018, doi: 10.1088/1742-6596/1142/1/012012.

E. Ernawati, S. S. K. Baharin, and F. Kasmin, “A review of data mining methods in RFM-based customer segmentation,” J. Phys.: Conf. Ser., vol. 1869, no. 1, p. 012085, Apr. 2021, doi: 10.1088/1742-6596/1869/1/012085.

M. Sarkar, A. R. Puja, and F. R. Chowdhury, “Optimizing Marketing Strategies with RFM Method and K-Means Clustering-Based AI Customer Segmentation Analysis,” JBMS, vol. 6, no. 2, pp. 54–60, Mar. 2024, doi: 10.32996/jbms.2024.6.2.5.

M. T. Ballestar, P. Grau-Carles, and J. Sainz, “Customer segmentation in e-commerce: Applications to the cashback business model,” Journal of Business Research, vol. 88, pp. 407–414, Jul. 2018, doi: 10.1016/j.jbusres.2017.11.047.

M. F. Faraone, M. Gorgoglione, C. Palmisano, and U. Panniello, “Using context to improve the effectiveness of segmentation and targeting in e-commerce,” Expert Systems with Applications, vol. 39, no. 9, pp. 8439–8451, Jul. 2012, doi: 10.1016/j.eswa.2012.01.174.

S. Butsianto and N. T. Mayangwulan, “Penerapan Data Mining Untuk Prediksi Penjualan Mobil Menggunakan Metode K-Means Clustering,” JNKTI, vol. 3, no. 3, pp. 187–201, Dec. 2020, doi: 10.32672/jnkti.v3i3.2428.

J. A. Fehrer, H. Woratschek, C. C. Germelmann, and R. J. Brodie, “Dynamics and drivers of customer engagement: within the dyad and beyond,” JOSM, vol. 29, no. 3, pp. 443–467, Jun. 2018, doi: 10.1108/JOSM-08-2016-0236.

S. Stremersch and G. J. Tellis, “Strategic Bundling of Products and Prices: A New Synthesis for Marketing,” Journal of Marketing, vol. 66, no. 1, pp. 55–72, Jan. 2002, doi: 10.1509/jmkg.

A. Chandramouli, “Strategies and Impact of Customer Loyalty Programs in the Technology Sector: A Comprehensive Analysis,” Open Access, vol. 1, no. 2, 2020.

M. Nabipour, P. Nayyeri, H. Jabani, S. S., and A. Mosavi, “Predicting Stock Market Trends Using Machine Learning and Deep Learning Algorithms Via Continuous and Binary Data; a Comparative Analysis,” IEEE Access, vol. 8, pp. 150199–150212, 2020, doi: 10.1109/ACCESS.2020.3015966.

H. Hu, L. Tang, S. Zhang, and H. Wang, “Predicting the direction of stock markets using optimized neural networks with Google Trends,” Neurocomputing, vol. 285, pp. 188–195, Apr. 2018, doi: 10.1016/j.neucom.2018.01.038.

W. J. Murdoch, C. Singh, K. Kumbier, R. Abbasi-Asl, and B. Yu, “Definitions, methods, and applications in interpretable machine learning,” Proc. Natl. Acad. Sci. U.S.A., vol. 116, no. 44, pp. 22071–22080, Oct. 2019, doi: 10.1073/pnas.1900654116.

D. Lien Minh, A. Sadeghi-Niaraki, H. D. Huy, K. Min, and H. Moon, “Deep Learning Approach for Short-Term Stock Trends Prediction Based on Two-Stream Gated Recurrent Unit Network,” IEEE Access, vol. 6, pp. 55392–55404, 2018, doi: 10.1109/ACCESS.2018.2868970.

B. J. Ali and G. Anwar, “Marketing Strategy: Pricing strategies and its influence on consumer purchasing decision,” IJREH, vol. 5, no. 2, pp. 26–39, 2021, doi: 10.22161/ijreh.5.2.4.

S. Kaur Chatrath, G. S. Batra, and Y. Chaba, “Handling consumer vulnerability in e-commerce product images using machine learning,” Heliyon, vol. 8, no. 9, p. e10743, Sep. 2022, doi: 10.1016/j.heliyon.2022.e10743.

C. A. Suwandi, R. Yanto, and D. Apriadi, “Implementasi Metode Apriori pada Data Mining untuk Pola Pembelian Barang pada Toko Matahari Kota Lubuklinggau,” vol. 03, no. 01, 2021.

B. E. Adiana, I. Soesanti, and A. E. Permanasari, “Analisis Segmentasi Pelanggan Menggunakan Kombinasi RFM Model dan Teknik Clustering,” JUTEI, vol. 2, no. 1, pp. 23–32, Apr. 2018, doi: 10.21460/jutei.2018.21.76.

R. Gustriansyah, N. Suhandi, and F. Antony, “Clustering optimization in RFM analysis Based on k-Means,” IJEECS, vol. 18, no. 1, p. 470, Apr. 2020, doi: 10.11591/ijeecs.v18.i1.pp470-477.

R. Kohavi, L. Mason, R. Parekh, and Z. Zheng, “Lessons and Challenges from Mining Retail E-Commerce Data,” Machine Learning, vol. 57, no. 1/2, pp. 83–113, Oct. 2004, doi: 10.1023/B:MACH.0000035473.11134.83.

E. Ernawati, S. S. K. Baharin, and F. Kasmin, “A review of data mining methods in RFM-based customer segmentation,” J. Phys.: Conf. Ser., vol. 1869, no. 1, p. 012085, Apr. 2021, doi: 10.1088/1742-6596/1869/1/012085.

DOI: https://doi.org/10.21831/elinvo.v9i1.58671


  • There are currently no refbacks.

Copyright (c) 2024 Elinvo (Electronics, Informatics, and Vocational Education)

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Our Journal indexed by:

ISSN 2477-2399 (online) || ISSN 2580-6424 (print)

View My Stats

Flag Counter