Tensorial Principal Component Analysis in Detecting Temporal Trajectories of Purchase Patterns in Loyalty Card Data: Retrospective Cohort Study
- PMID: 38100168
- PMCID: PMC10757224
- DOI: 10.2196/44599
Tensorial Principal Component Analysis in Detecting Temporal Trajectories of Purchase Patterns in Loyalty Card Data: Retrospective Cohort Study
Abstract
Background: Loyalty card data automatically collected by retailers provide an excellent source for evaluating health-related purchase behavior of customers. The data comprise information on every grocery purchase, including expenditures on product groups and the time of purchase for each customer. Such data where customers have an expenditure value for every product group for each time can be formulated as 3D tensorial data.
Objective: This study aimed to use the modern tensorial principal component analysis (PCA) method to uncover the characteristics of health-related purchase patterns from loyalty card data. Another aim was to identify card holders with distinct purchase patterns. We also considered the interpretation, advantages, and challenges of tensorial PCA compared with standard PCA.
Methods: Loyalty card program members from the largest retailer in Finland were invited to participate in this study. Our LoCard data consist of the purchases of 7251 card holders who consented to the use of their data from the year 2016. The purchases were reclassified into 55 product groups and aggregated across 52 weeks. The data were then analyzed using tensorial PCA, allowing us to effectively reduce the time and product group-wise dimensions simultaneously. The augmentation method was used for selecting the suitable number of principal components for the analysis.
Results: Using tensorial PCA, we were able to systematically search for typical food purchasing patterns across time and product groups as well as detect different purchasing behaviors across groups of card holders. For example, we identified customers who purchased large amounts of meat products and separated them further into groups based on time profiles, that is, customers whose purchases of meat remained stable, increased, or decreased throughout the year or varied between seasons of the year.
Conclusions: Using tensorial PCA, we can effectively examine customers' purchasing behavior in more detail than with traditional methods because it can handle time and product group dimensions simultaneously. When interpreting the results, both time and product dimensions must be considered. In further analyses, these time and product groups can be directly associated with additional consumer characteristics such as socioeconomic and demographic predictors of dietary patterns. In addition, they can be linked to external factors that impact grocery purchases such as inflation and unexpected pandemics. This enables us to identify what types of people have specific purchasing patterns, which can help in the development of ways in which consumers can be steered toward making healthier food choices.
Keywords: diet; food; food expenditure; loyalty card data; principal components; purchase pattern; seasonality; tensorial data.
©Reija Autio, Joni Virta, Klaus Nordhausen, Mikael Fogelholm, Maijaliisa Erkkola, Jaakko Nevalainen. Originally published in the Journal of Medical Internet Research (https://www.jmir.org), 15.12.2023.
Conflict of interest statement
Conflicts of Interest: None declared.
Figures






Similar articles
-
Characterization and Correction of Bias Due to Nonparticipation and the Degree of Loyalty in Large-Scale Finnish Loyalty Card Data on Grocery Purchases: Cohort Study.J Med Internet Res. 2020 Jul 15;22(7):e18059. doi: 10.2196/18059. J Med Internet Res. 2020. PMID: 32459633 Free PMC article.
-
The dynamics in food selection stemming from price awareness and perceived income adequacy: a cross-sectional study using 1-year loyalty card data.Am J Clin Nutr. 2024 May;119(5):1346-1353. doi: 10.1016/j.ajcnut.2024.03.003. Epub 2024 Mar 7. Am J Clin Nutr. 2024. PMID: 38458401 Free PMC article.
-
Large-scale loyalty card data in health research.Digit Health. 2018 Nov 29;4:2055207618816898. doi: 10.1177/2055207618816898. eCollection 2018 Jan-Dec. Digit Health. 2018. PMID: 30546912 Free PMC article.
-
Online grocery shopping: promise and pitfalls for healthier food and beverage purchases.Public Health Nutr. 2018 Dec;21(18):3360-3376. doi: 10.1017/S1368980018002409. Epub 2018 Oct 19. Public Health Nutr. 2018. PMID: 30338751 Free PMC article. Review.
-
An introductory review on the application of principal component analysis in the data exploration of the chemical analysis of food samples.Food Sci Biotechnol. 2024 Feb 3;33(6):1323-1336. doi: 10.1007/s10068-023-01509-5. eCollection 2024 May. Food Sci Biotechnol. 2024. PMID: 38585573 Free PMC article. Review.
Cited by
-
A prognostic model for lung adenocarcinoma based on cuproptosis and disulfidptosis related genes revealing the key prognostic role of FURIN.Sci Rep. 2025 Feb 19;15(1):6057. doi: 10.1038/s41598-025-90653-5. Sci Rep. 2025. PMID: 39972012 Free PMC article.
-
Shopping Data for Population Health Surveillance: Opportunities, Challenges, and Future Directions.J Med Internet Res. 2025 Aug 6;27:e75720. doi: 10.2196/75720. J Med Internet Res. 2025. PMID: 40769214 Free PMC article.
References
-
- Demchenko Y, Grosso P, De LC, Membrey P. Addressing big data issues in scientific data infrastructure. Proceedings of the 2013 International Conference on Collaboration Technologies and Systems; CTS '13; May 20-24, 2013; San Diego, CA. 2013. pp. 48–55. https://ieeexplore.ieee.org/document/6567203 - DOI
-
- Nevalainen J, Erkkola M, Saarijärvi H, Näppilä T, Fogelholm M. Large-scale loyalty card data in health research. Digit Health. 2018 Nov 29;4:2055207618816898. doi: 10.1177/2055207618816898. https://journals.sagepub.com/doi/10.1177/2055207618816898?url_ver=Z39.88... 10.1177_2055207618816898 - DOI - DOI - PMC - PubMed
-
- Clark SD, Shute B, Jenneson V, Rains T, Birkin M, Morris MA. Dietary patterns derived from UK supermarket transaction data with nutrient and socioeconomic profiles. Nutrients. 2021 Apr 27;13(5):1481. doi: 10.3390/nu13051481. https://www.mdpi.com/resolver?pii=nu13051481 nu13051481 - DOI - PMC - PubMed
-
- Rains T, Longley P. The provenance of loyalty card data for urban and retail analytics. J Retail Consum Serv. 2021 Nov;63:102650. doi: 10.1016/j.jretconser.2021.102650. https://www.sciencedirect.com/science/article/abs/pii/S0969698921002162 - DOI
Publication types
MeSH terms
LinkOut - more resources
Full Text Sources