Understanding the product attributes that drive consumer purchases is crucial for retailers and marketers to remain competitive. However, extrinsic and intrinsic attributes are often analysed in isolation, overlooking their complex interplay in real-life sales scenarios. This study aims to investigate how intrinsic and extrinsic yogurt attributes influence sales forecasts and consumer purchasing decisions.
This study addresses this limitation by evaluating the positive or negative impact of yogurt attributes on sales forecasts, representing properties that support high sales figures of these attributes. Forecasts were generated using the machine learning (ML) method eXtreme Gradient Boosting (XGB), a decision tree-based ensemble learner. This model was trained on four years of data that included diverse yogurt attributes available to consumers at the point of sale, such as price and nutrient facts. A subsequent SHapley Additive exPlanations analysis provided a detailed overview of extrinsic and intrinsic attributes supporting high sales figures. The corresponding code is publicly available at https://github.com/grimmlab/Forecasting-Perishables-with-XAI.
XGB achieved strong forecasting performance with an R2 score of 0.89. Calorie content emerged as the most important intrinsic attribute, while price was identified as the most influential extrinsic feature.
These findings offer valuable insights for marketers, retailers, and product developers, highlighting the complex interplay of product attributes in shaping yogurt purchase behaviour and showcasing the practical application of ML and explainable artificial intelligence in consumer analytics.
This study offers practical insights into the interpretation of ML forecasting models in retail environments. Furthermore, it offers a holistic approach to extrinsic and intrinsic attributes affecting perishable food product purchases.
Introduction
To remain competitive, retailers and manufacturers must forecast sales dynamically. This requires understanding consumer preferences and purchase drivers at the point of sale (POS) to adapt marketing and product development strategies effectively. Product-specific factors influencing consumers’ quality perception and satisfaction at the POS can be categorized as intrinsic and extrinsic attributes (Espejel et al., 2007; Malekpour et al., 2022). Extrinsic attributes refer to external factors like product origin and brand, while intrinsic attributes involve inherent characteristics of food products, such as nutrient composition (Ballco and Gracia, 2022). Both types significantly impact consumer food choices (Bou Fakhreddine and Sánchez, 2023; Symmank, 2019).
Symmank (2019) noted in a literature review, including a quantification of the previous findings, that most studies focus on either intrinsic or extrinsic attributes in isolation, with few adopting a holistic approach. Furthermore, research primarily examines consumer liking and purchase intention through questionnaires and experiments, while actual consumer behaviour is less frequently investigated. However, investigating extrinsic and intrinsic attributes together using real-world data offers an opportunity to better understand which product features drive sales and influence consumer purchases. Hoffmann et al. (2020) highlight that besides a need for studies using a holistic approach to examine intrinsic and extrinsic attributes, there is a need for methodological diversity in this area of research. Additionally, in their systematic review, Fernqvist et al. (2024) conclude a need for real-life studies that investigate influences on food choices outside the lab.
In contrast to conventional approaches that rely on self-reported preferences or artificial settings, our study leverages actual retail sales data combined with an ML-driven approach to uncover the relative importance of intrinsic and extrinsic product attributes in real purchase decisions. Instead of proxy constructs such as consumer liking or preferences, the current approach investigates actual purchases. Furthermore, as opposed to much of the previous research, the current study analyses extrinsic and intrinsic product attributes contributing to purchase decisions holistically rather than in isolation. This approach not only enhances ecological validity but also allows researchers and retailers to use readily available data to analyse consumer preferences for specific products and their corresponding attributes without requiring additional data collection, such as questionnaires.
Exploring intrinsic and extrinsic attributes that lead to food purchase decisions can help retailers to gain a better understanding of their customers. This may result in an improved customer experience (Volkmar et al., 2022). Malekpour et al. (2022) found that highlighting the appropriate intrinsic or extrinsic product attributes can contribute to increased customer satisfaction. Depending on the competitive intensity of the offers, both types of attributes affect customer satisfaction in different ways.
Electronic POS (EPOS) data is a valuable resource for analysing extrinsic and intrinsic food attributes consumers consider at the POS. To exploit this valuable resource, explainable artificial intelligence (XAI) can be utilized, which helps to understand a machine learning (ML) model's decision.
At this point, it is important to clearly define and distinguish the established term XAI from the often synonymously used term interpretable machine learning (IML), as this ambiguity of terms is frequently overlooked in the literature (Lipton, 2018). While IML refers to the extent to which a human can comprehend the internal mechanics or logic of a model, XAI offers both interpretability and the capacity to understand and justify individual decisions made by the model (Arrieta et al., 2020). Murdoch et al. (2019) highlight that IML is typically model-specific, inherently transparent, and limited to ML algorithms with built-in interpretability, such as linear models or decision trees. In contrast, XAI methods are often model-agnostic and applied post hoc, making them suitable for explaining complex black-box models. A classic example of IML is the use of weight coefficients in linear regression, whereas XAI techniques include methods like SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME) (Ribeiro et al., 2016).
ML models are more and more present in companies due to the often-high complexity of business decisions. This complexity forces decision-makers to rely on their experience and intuition. However, according to Brynjolfsson et al. (2011) and McAfee and Brynjolfsson (2012), companies perform better when they make decisions data-driven, which can be accomplished with ML. However, a key impediment to these ML-based systems is their often-lacking transparency. Good performing models allow for powerful predictions, but are often considered as a black-box (Gramegna and Giudici, 2021), inaccessible to human interaction and analysis. Understanding a ML model's decisions can, e.g. enable interactive evaluation of decision options in a business environment (Bohanec et al., 2017). This creates the need for comprehending ML models by leveraging XAI. XAI methods can directly analyse ML model components or study the impact of attributes by evaluating the ML models sensitivity to perturbations in the input data. XAI methods can be utilized to debug, justify, control, and improve the ML model and its predictions (Adadi and Berrada, 2018).
This study applies an ML-based forecasting model trained on EPOS data of yogurt products combined with corresponding product attributes. By leveraging the XAI method SHAP values, the model identifies the most influential intrinsic and extrinsic attributes, evaluating them in the context of all other product features.
ML as well as artificial intelligence methods are frequently being used in retail to optimize business and marketing strategies (Dabija and Frau, 2025). In Germany for instance, retailers such as EDEKA and Lidl already commonly use forecasting tools to predict product demand. According to Röde (2023), however, these systems are not always easily understood by users. This lack of interpretability is a major drawback, as forecasting models are often perceived as a “black-box”, leading to a lack of user trust (Herhausen et al., 2024). Therefore, this study explores additional applications of these tools using readily available data, aiming to improve the usability of ML models by providing visualized interpretations. By integrating SHAP with sales forecasting, it examines the intersection of ML-driven insights and consumer behaviour, offering practical benefits for marketing and product strategy. This approach enables a holistic analysis of product attributes, appreciating the complex interactions between extrinsic and intrinsic factors in real-world grocery shopping environments.
To illustrate this method, this study focuses on yogurts as a case example. Yogurt is popular across various cultures, age groups, and genders (Chandan et al., 2017). In Germany, yogurt consumption remains high, with 13.7 in 2022, though slightly down from 16.0 kg in 2018 (Milchindustrie-Verband, 2024). Specifically, for perishable products, like yogurts, forecasting demand is considered a valuable tool for managing the supply at the POS and preventing potential food waste (Duan et al., 2012).
Thus, this study builds on existing research by examining key product-specific drivers for yogurts. It identifies the most important intrinsic and extrinsic characteristics influencing sales based on real EPOS data. Extrinsic attributes analysed include price (regular and promotional), brand (private vs. manufacturer brands), packaging (size and material), and production method (organic vs. conventional). Intrinsic attributes include nutritional properties (fat, calories, sugar, protein, low-fat options) and flavour (plain, fruit, other).
To summarize, the following research question was investigated:
Which intrinsic and extrinsic product attributes, that are available at the POS, are driving customer purchase decisions for yogurts?
Along with this research question, the current paper’s objectives are to demonstrate the usability of SHAP in an applied retail context and to evaluate if the selected product attributes (price, brand, flavour, nutrition facts, packaging, and production method) are suitable to analyse and predict yogurt sales. Thereby, this research offers a holistic perspective on the role of intrinsic and extrinsic product attributes in yogurt sales. Using SHAP to analyse and interpret this data, this study fosters methodological diversity in this field of research and addresses the need for studies investigating intrinsic and extrinsic attributes together rather than in isolation and in a real-life setting. By using real sales data and an ML-driven approach as a novel methodology investigating the impact of extrinsic and intrinsic attributes on food choice, it aims to uncover practical insights for retailers and manufacturers. Understanding these complex consumer behaviours may help retailers enhance marketing strategies and optimize their use of forecasting tools by incorporating SHAP. Furthermore, gaining a better understanding of the intrinsic and extrinsic attributes that drive purchase decisions can support optimization of existing product recipes. Additionally, such knowledge contributes to improving customer satisfaction, as well as developing a more comprehensive understanding of consumer behaviour at the POS.
The next sections will consist of a short literature review regarding the investigated extrinsic and intrinsic attributes and relevant ML forecasting studies, a material and methods section, explaining the methodology of the current paper, a result and a discussion section, showcasing the results as well as an assessment of those in light of the literature and their implications for research and practice and finally a conclusion summarizing the findings of the study.
Literature overview
Consumer purchase behaviour
Consumer purchase behaviour is a complex process influenced by multiple factors (Stankevich, 2017). According to the German nutrition report (“Ernährungsbericht”), German consumers prioritize taste, price, environmental factors, and healthfulness when buying food (Bundesministerium für Ernährung und Landwirtschaft, 2024). The theoretical basis for the current study is Lancaster's (1966) well-established theory that consumers make choices based on the attributes of a product rather than the product as a whole. It is therefore crucial to analyse the attributes that compose a product in order to gain insights into consumer preferences and purchase decisions. Building on this, the Total Food Quality Model (Brunsø et al., 2002), suggests that extrinsic and intrinsic cues are central to food quality perception and preference formation. This model proposes that consumers form quality perceptions based on cues available both before and after purchase. Pre-purchase cues include expectations formed from observable product information, such as packaging, price, and labelling. Only the cues that are actually perceived by consumers contribute to forming a quality expectation, which is thought to be an essential driver of purchase decisions (Fernqvist et al., 2024).
The current study uses this theoretical foundation to investigate which intrinsic and extrinsic pre-purchase yogurt attributes contribute to perceived quality, as reflected in actual purchase behaviour. It summarizes the most influential product attributes, aiming to identify the quality cues most likely to be perceived by consumers. Based on these theories, it is expected that the model will be able to efficiently forecast purchases based on product attributes and reveal a ranking of importance, since some cues are more likely to be perceived and thus more influential in shaping consumer expectations.
Building on this, the following section provides an overview of the key product attributes investigated in this study, focusing on those available to consumers at the POS, prior to the purchase decision.
Extrinsic product attributes
Price
Price acceptability significantly influences consumer purchase decisions, with consumers considering a range of acceptable prices for a product (Malc et al., 2016). The price of a product conveys key information like quality, perceived value, and willingness to purchase (e.g. Lemmerer and Menrad, 2015; Lemmerer and Menrad, 2019). Studies show consumers respond to price changes, favouring lower prices (e.g. Hoek et al., 2017). Additionally, price promotions effectively shift consumer choices and can encourage healthier food purchases (Emberger-Klein et al., 2022; Hawkes, 2009). In practice, however, it has been found that price promotions are more frequently applied to unhealthy food products (Bennett et al., 2020). For dairy products, price seems to be one of the most important attributes for consumers (e.g. Pereira et al., 2022; Harwood and Drake, 2018) and specifically the recent rise in inflation rates in Germany has led consumers to place even greater emphasis on price value relationships of food (Hempel and Roosen, 2024). Critically assessing the importance of the price variable in a holistic approach with other attributes is therefore crucial.
Brand
Brands have been found to influence consumers through different channels, e.g. brand image (Cuong, 2022) or brand identity (Acar et al., 2024). Specifically, brand identity may play a key role in the perception of manufacturer and private brands. Fuduric et al. (2022), for instance, found that participants across four different countries preferred manufacturer branded yogurt products over private label ones. The manufacturer option was perceived as more positive by the participants. Furthermore (Košičiarová et al., 2020), conducted an experiment analysing consumer loyalty towards private brands and found that more than of the participants preferred to buy private label yogurt and more than considered themselves as loyal customers towards a brand. In the German market, a trend towards increasing sales of manufacturer brands has been observed in recent years (IFH Köln, 2024). How manufacturer and private brands are valued compared to other food product attributes, however, remains mostly unexplored.
Organic production
There is an observed increase in consumers’ importance on organic production methods worldwide (Hurtado-Barroso et al., 2019). Generally, consumers prefer products with an organic label (Malissiova et al., 2022), which is also observed in studies using physiological measures (D'Adamo et al., 2025). This preference is often triggered by an association between organic production methods and health, particularly by linking organic food to purity (Ditlevsen et al., 2019). In the case of dairy products, for instance, consumers’ perception of organic milk being healthier was found to be the biggest driver for purchase. This was followed by beliefs about the ethical treatment of animals and supporting local farms and farmers (Harwood and Drake, 2018). A systematic review by Tobi et al. (2019) found that organic was the most preferred type of label, compared to other environmental and social responsibility as well as nutrition labelling information. However, a recent study by Brückner et al. (2023) found that consumers do not place high importance on production methods compared to other yogurt attributes. Nevertheless, investigating the importance of organic production methods in a holistic framework may give important insights on sustainability and health considerations of consumers.
Packaging
Food packaging plays a significant role in consumer decision-making (Gelici-Zeko et al., 2013). Besides the package design (e.g. colour and informative cues), the package material plays an important role in shaping consumer preferences (Bou-Mitri et al., 2021). A review found that glass and cardboard packaging are seen as more sustainable than metal and plastic (Ketelsen et al., 2020). For packaging apples, German consumers least preferred plastic, favouring bio-based plastic, cardboard or no packaging, respectively (Decker et al., 2021). In dairy, Harwood and Drake (2018) found US consumers preferred plastic jugs for fluid milk, though packaging was less important than other attributes. Conversely, lactose-free milk buyers preferred cardboard containers (Rizzo et al., 2020), while Neill and Williams (2016) showed that US milk-consumers favoured glass bottles and are willing to pay extra for it. Recent research showed that consumers are generally willing to switch to more environmental-friendly packaging options (Drechsel et al., 2025). However, when there is uncertainty about the sustainability aspects of the packaging, consumers are not willing to pay more for an alternative packaging option (Herrmann et al., 2022). Analysing how different packaging options impact consumer decisions at the POS is an important step in fostering new ways of making the food market more sustainable.
Intrinsic product attributes
Nutrition facts
Nutrition facts provide essential insights into a product’s healthiness, which is particularly relevant given the wide variety of yogurts with differing nutritional content (Tremblay and Panahi, 2017). Fat content often serves as a key nutrient for yogurt consumers (Mai and Hoffmann, 2012), while high-protein dairy products have seen significant sales growth in Germany in recent years (Brechelmacher, 2022). Furthermore, current public health strategies include a reduction of sugars in food products, however, in yogurts this has been observed to meet the challenge of remaining adequate sensory acceptance (de Souza et al., 2021). Research by Li and Dando (2019) revealed that consumers preferred yogurts labelled “low fat” or “high protein” over those labelled “made with stevia” or “all natural,” with the latter scoring lowest. Similarly, Gupta et al. (2022) found that high fat, sugar, and calorie content were factors reducing overall yogurt appeal, suggesting a general consumer preference for healthier food options. However, other studies indicate that while health is important, consumers do not necessarily prioritize it over sensory enjoyment (Ballco and Gracia, 2022). Therefore, it is necessary to uncover which of the main nutrients influence consumer purchase decisions at the POS and which levels of importance are placed on them.
Flavour
Flavour is a key factor for consumers and plays an important role in determining the palatability of food (Tepper and Barbarossa, 2020). Since tasting is not possible in stores, factors like taste experience, prior knowledge, and flavour perception become crucial, which are influenced by extrinsic attributes such as packaging, brands, and prices (Okamoto and Dan, 2013). Research shows that plain and fruit-flavoured yogurts are popular (Chandan et al., 2017). However, Gupta et al. (2022) found in a taste test with seven different flavours that cookie flavour was most preferred, while berry flavour was least liked. Therefore, including this crucial attribute into a holistic framework of importances of yogurt characteristics is essential.
Demand forecasting
Multiple studies have demonstrated the use of ML methods for forecasting sales of perishable goods. Arunraj et al. (2014) applied forecasting approaches to predict the sales of bananas in a retail store. Liu and Ichise (2017) conducted a comparative study on various ML methods for forecasting food sales in a Japanese supermarket chain, focusing on the influence of meteorological data. Huber and Stuckenschmidt (2020) demonstrated the superiority of ML algorithms over classical statistical approaches in a comparative study of bakery sales forecasting. This superiority is further confirmed by Falatouri et al. (2022), comparing predictive analytics of statistical and ML models in retail supply chain management using seasonal sales data from an Austrian retailer. Haselbeck et al. (2022) presented a first proof-of-concept by showing the feasibility of predicting seasonally fluctuating demand of perishable products by forecasting horticultural sales using both classical forecasting and ML-based approaches, and observed a superiority of the ensemble learner eXtreme Gradient Boosting (XGB) on all datasets and for several evaluation metrics. Those results were evaluated in a broader comparative study by Eiglsperger et al. (2024). Using a variety of real-world horticultural data, the authors applied three classical and twelve ML-based forecasting approaches, and again showed the superiority of ML methods over classical forecasting approaches, with the ensemble learner XGB emerging as the best model. Food demand forecasting shares similarities with horticultural sales, especially for perishable, seasonally fluctuating products, making the cited studies a suitable guidance for forecasting yogurt sales.
Attribute importance
In ML applications, such as corporate production, procurement planning (Drechsler et al., 2025; Eiglsperger et al., 2024; Haselbeck et al., 2022) and marketing, research often faces a trade-off between prediction interpretability and performance. A better performing model often comes with more complexity, and therefore less interpretability. This problem is referred to as the “black-box syndrome” (Gramegna and Giudici, 2021). Addressing the challenge of interpretability, SHAP has been used in various domains to interpret the results of complex ML models, such as in medicine (Nohara et al., 2022) or choice behaviour, e.g. for electric vehicle charging stations (Ullah et al., 2023).
Material and methods
Data collection
The sales data used in this study was recorded and provided by a food retailer located in Bavaria (Southern Germany). Specifically, the dataset covered weekly sales data from nine different sales locations in 2020 and ten between 2021 and 2023. The data covered the time period between January and December for each year. The sales locations represented supermarkets of varying sizes offering a wide range of products, such as food products, fresh produce, beverages, household goods, personal care products, and often regional/specialty items. The investigated yogurts were selected based on availability in most of those locations (based on store checks in 2021) and high sales figures (products with the highest revenues) in previous years in the German market indicated by consumer panel data purchased from the GfK SE Company. In addition, with an effort to accurately reflect the variety of the yogurt market, special functional foods, such as high-protein yogurts, were selected for the current study. This resulted in data of 260 yogurts in 2020, 268 yogurts in 2021, 257 yogurts in 2022 and 241 yogurts in 2023. Information concerning the brand, the flavour, the name of the yogurt, the sales numbers and revenue made with the products, as well as the number of price promotions and the revenue made from those promotions were provided by the retailer. Based on that, the individual yogurt prices, as well as the average number of price promotions were calculated. For example, a yogurt with a revenue of € and 47.00 sales was calculated to have a price of . The average number of price promotions was calculated for each yogurt product for every week, while also considering the different sales locations. Product-specific attributes, such as sugar content or packaging size were derived from online databases (https://www.codecheck.info, https://openfoodfacts.org), using the Global Trade Item Number of the respective yogurt products. Additionally, based on the fat contents, the attribute “low fat options” was calculated, comparing fat-reduced products to full fat ones (Bundesamt für Justiz, 1970). All analysed product attributes are portrayed in Table 1. Summary statistics for the dataset over the period from January 2020 to December 2023 and the weekly sold units of the included yogurt products, respectively are the following: Samples: 50,165, mean: 70.74, median: 35, standard deviation: 100.81 and maximum: 1950. The standard deviation is higher than the mean, reflecting a dataset with significant variation.
Analysed attributes and their characteristics
| Category | Attribute | Product attribute | Characteristics |
|---|---|---|---|
| Extrinsic product attributes | Price | Product price | Price [€] |
| Price promotion | Mean number of price promotions | ||
| Mean price of promoted products [€] | |||
| Production | Production method | Organic | |
| Non-organic | |||
| Packaging | Packaging size | Size [g] | |
| Packaging material | Glass container | ||
| Plastic container | |||
| Brand | Product brand | Manufacturer brand | |
| Private label brand | |||
| Intrinsic product attributes | Nutrition facts | Fat content | Fat content |
| Sugar content | Sugar content | ||
| Protein content | Protein content | ||
| Calories | Calories | ||
| Low-fat options | Fat-reduced | ||
| Full fat | |||
| Flavour | Product flavour | Plain | |
| Fruit | |||
| Other |
| Category | Attribute | Product attribute | Characteristics |
|---|---|---|---|
| Extrinsic product attributes | Price | Product price | Price [€] |
| Price promotion | Mean number of price promotions | ||
| Mean price of promoted products [€] | |||
| Production | Production method | Organic | |
| Non-organic | |||
| Packaging | Packaging size | Size [g] | |
| Packaging material | Glass container | ||
| Plastic container | |||
| Brand | Product brand | Manufacturer brand | |
| Private label brand | |||
| Intrinsic product attributes | Nutrition facts | Fat content | Fat content |
| Sugar content | Sugar content | ||
| Protein content | Protein content | ||
| Calories | Calories | ||
| Low-fat options | Fat-reduced | ||
| Full fat | |||
| Flavour | Product flavour | Plain | |
| Fruit | |||
| Other |
Demand forecasting
ML-based approaches have an advantage over classical statistical forecasting methods because they can model complex relationships in real-world datasets. We used the decision tree-based ensemble learner XGB to predict yogurt sales. Ensemble learning combines predictions from multiple models for better performance. XGB is a computationally efficient implementation of gradient boosting, where decision trees are sequentially constructed following the gradient of a loss function (Chen and Guestrin, 2016). We chose XGB for its superior performance in similar product demand forecasting studies (Haselbeck et al., 2022; Eiglsperger et al., 2024; Bojer and Meldgaard, 2021; Petropoulos et al., 2018).
Unlike model parameters, which are estimated from data, hyperparameters (e.g. regularization constants) must be optimized. Bayesian optimization, a state-of-the-art method, tracks past evaluations to form a probability model mapping hyperparameters to objective function scores. This fast-converging technique allows for a larger hyperparameter space. We used the scale-independent score to guide this search. The score is defined as:
where is the forecasted value, is the true value, and is the mean of the true values. The score ranges from to 1, with a higher value reflecting better forecasts. To ensure robust model performance, we employed random perturbation cross-validation. This resampling method divides the data into subsets, trains the model on subsets, and validates it on the remaining subset. This process is repeated times, each time with different training and validation sets due to random perturbations in the data. By averaging the results of the objective function from the iterations, this method provides a more reliable estimate of model performance on unseen data compared to a unique train/validation split. In the experiments of our study, we applied .
To bring together all the aspects of the ML process mentioned above, a fully automated pipeline based on the general time series forecasting framework ForeTiS (Eiglsperger et al., 2023) was leveraged. ForeTiS covers the entire common time series forecasting workflow from the data preparation, including preprocessing and attribute engineering, to the model training and selection by using state-of-the-art Bayesian hyperparameter optimization via the Python package Optuna (Akiba et al., 2019). In the end, we obtained the final model after retraining on the entire training and validation data using the hyperparameter combination that worked best in a five-fold random permutation cross-validation in 200 hyperparameter optimization trials. The summary of hyperparameters and ranges as well as the corresponding explanation is given in appendix.
After tuning the hyperparameters, the model was tested on a separate, left-out test set, which consists of the last of the total, chronically ordered data (10,033 samples) to preserve the temporal order of the samples and to avoid data leakage between train, validation and test data (Bernett et al., 2024). Due to the lack of a universal evaluation metric in time series forecasting, it is common to compare against simple baseline methods and provide results with respect to multiple metrics (Hyndman and Athanasopoulos, 2018). Therefore, the mean absolute scaled error () as a further evaluation metric (Hyndman and Koehler, 2006) is provided, which is scale-independent and inherently provides a comparison against the Naïve approach, a common simple baseline. Using the mean absolute error (), the is defined as follows:
The is in the range , with a lower value reflecting better forecasts. A smaller reflects a better, and a greater than a worse performance than the approach.
SHapley Additive exPlanations
ML methods often face a trade-off between performance and interpretability. Understanding the impact of specific attributes on model output is crucial for many applications, enhancing transparency and aligning with human intuition.
Linear models use coefficients to indicate the importance of each attribute, but these can be distorted by the variable’s scale and fail to capture local importance. Decision tree-based models also struggle with local importance and model dependency, making their attribute importance incomparable to that derived from coefficients. Complex models like neural networks lack inherent attribute importance altogether.
SHAP is a game-theoretic XAI method that combines optimal importance allocation with local interpretability and global analysis for the given dataset and problem. Consider a cooperative game in which the attributes of the dataset act as players. SHAP will disclose the individual contribution of each player to the output of the model for each observation. This has the advantage of assigning an importance value to each attribute for a given prediction, and of revealing both positive and negative effects (Ullah et al., 2023). SHAP uses the classical Shapley values from game theory (Shapley, 1953), which define the relevance of an attribute with corresponding to the model's output defined by a subset of attributes, and the total set of attributes :
After Štrumbelj and Kononenko (2011) and Štrumbelj and Kononenko (2014) first introduced utilizing Shapley values for explaining ML predictions, the unified SHAP framework introduced by Lundberg and Lee (2017) was a significant advancement in XAI, which we leveraged in this study.
SHAP is prediction model independent, meaning it can be applied to many different applications. This flexibility can lead to the use of ML to areas insisting on interpretable models. The property of being unconnected to a particular prediction model can also increase the acceptance of novel and complex models in various business environments (Bohanec et al., 2017).
Results
This study aimed to investigate which intrinsic and extrinsic product attributes, that are available at the POS, are driving the customers' purchase decisions for yogurts.
Forecasting of yogurt sales
The forecasts were generated using the decision tree-based ensemble learner XGB. Since the full test set is too large to display at once, a sample of the forecasts with the underlying true values is shown in Figure 1.
The line graph shows a vertical axis labeled “Sales [sold units]” ranging from 0 to 500 in increments of 100 units and a horizontal axis labeled “Sample” ranging from 300 to 400 in increments of 5 units. The graph presents two lines. A legend in the top-right corner indicates that the line with dashed markings represents “Forecasts” and the dashed line with cross markings represents “True Data”. The line with dashed markings representing “Forecasts” starts from (300, 155), passing through multiple points that form sharp peaks and troughs, reaching high values at (326, 500), (336, 238), (361, 306), (388, 369), and ending at (399, 331). The line with cross markings representing “True Data” starts from (300, 123), passing through multiple points that form sharp peaks and troughs, reaching high values at (326, 395), (336, 172), (361, 246), (388, 180), and ending at (399, 177). Both lines closely follow the same peaks and troughs, and maintain a similar pattern with minor deviations.An excerpt plot of the prediction results and true data. Notes: On the horizontal axis, the number of the sample within the test set that has to be forecasted is plotted, while the sales of the yogurt products are plotted on the vertical axis. The predicted values are plotted in a green solid line, and the true values are shown in an indigo dashed line. Source: Authors’ own work
The line graph shows a vertical axis labeled “Sales [sold units]” ranging from 0 to 500 in increments of 100 units and a horizontal axis labeled “Sample” ranging from 300 to 400 in increments of 5 units. The graph presents two lines. A legend in the top-right corner indicates that the line with dashed markings represents “Forecasts” and the dashed line with cross markings represents “True Data”. The line with dashed markings representing “Forecasts” starts from (300, 155), passing through multiple points that form sharp peaks and troughs, reaching high values at (326, 500), (336, 238), (361, 306), (388, 369), and ending at (399, 331). The line with cross markings representing “True Data” starts from (300, 123), passing through multiple points that form sharp peaks and troughs, reaching high values at (326, 395), (336, 172), (361, 246), (388, 180), and ending at (399, 177). Both lines closely follow the same peaks and troughs, and maintain a similar pattern with minor deviations.An excerpt plot of the prediction results and true data. Notes: On the horizontal axis, the number of the sample within the test set that has to be forecasted is plotted, while the sales of the yogurt products are plotted on the vertical axis. The predicted values are plotted in a green solid line, and the true values are shown in an indigo dashed line. Source: Authors’ own work
In the forecasting task, an R2 score of and a of were achieved. The value of the indicates that a simple baseline method is outperformed by an ML algorithm.
Interpreting the predicted model using SHAP values
To address the trade-off between interpretability and performance, SHAP was found to be a promising approach. Figure 2 shows the results of the SHAP analysis as a bee swarm plot.
The S H A P summary plot shows a horizontal axis labeled “S H A P value (impact on model output)” ranging from negative 50 to 250 in increments of 50 units and a vertical axis listing fifteen product attributes. From top to bottom, the attributes are labeled “Calories,” “Price,” “Packaging size,” “Mean price of price promotions,” “Mean number of price promotions,” “Plain flavor (yes or no),” “Sugar content,” “Protein content,” “Fat content,” “Brand (yes or no),” “Fruit flavor (yes or no),” “Production method (organic yes or no),” “Other flavor (yes or no),” “Packaging material (glass yes or no),” and “Low fat option (yes or no)”. Each attribute line contains clusters of colored dots distributed horizontally. The dots range in color from purple to yellow, corresponding to low and high values of the analyzed product characteristics, as shown by the color scale bar on the right labeled “Value of analyzed product characteristic,” with “Low” at the bottom in purple and “High” at the top in yellow. The data for each product attribute is shown as follows: Attribute: Calories; Range: negative 50 to 0, S H A P Value: Medium, Range: 0 to 120; S H A P Value: Low. Attribute: Price; Range: negative 50 to 0, S H A P Value: Medium, Range: 0 to 70, S H A P Value: Low. Attribute: Packaging size; Range: negative 40 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Range: 10 to 40, S H A P Value: High. Attribute: Mean price of price promotions; Range: negative 10 to 10, S H A P Value: High, Range: 10 to 40, S H A P Value: Medium, Range: 40 to 100, S H A P Value: Low. Attribute: Mean number of price promotions; Range: negative 30 to 0, S H A P Value: Low, Range: 0 to 20, S H A P Value: Medium, Range: 20 to 90, S H A P Value: High. Attribute: Plain flavor (yes or no); Range: negative 20 to 0, S H A P Value: Low, Range: 20 to 90, S H A P Value: High. Attribute: Sugar content; Range: negative 50 to 10, S H A P Value: Medium, Range: 10 to 120, S H A P Value: Low. Attribute: Protein content; Range: negative 40 to 80, S H A P Value: Medium. Attribute: Fat content; Range: negative 60 to negative 20, S H A P Value: Low, Range: negative 20 to 70, S H A P Value: Medium. Attribute: Brand (yes or no); Range: negative 20 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Range: 10 to 40, S H A P Value: High. Attribute: Fruit flavor (yes or no); Range: negative 10 to 0, S H A P Value: Low, Range: 0 to 10, S H A P Value: High. Range: 10 to 30, S H A P Value: Low. Attribute: Production method (organic yes or no); Range: negative 30 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Attribute: Other flavor (yes or no); Range: negative 20 to 0, S H A P Value: High, Range: at 0, S H A P Value: Low. Attribute: Packaging material (glass yes or no); Range: negative 15 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Attribute: Low fat option (yes or no); Range: negative 10 to 0, S H A P Value: High, Range: at 0, S H A P Value: Low, Range: 0 to 10, S H A P Value: High.Bee swarm plot of the SHAP analysis. Notes: This graph presents individual data points without overlap, creating a “swarming” effect. It reveals the distribution, density and variation of data along a numeric variable more effectively than scatter or box plots. In SHAP analysis, it summarizes how top attributes impact the model's output. Each dot represents an instance on each attribute row. The horizontal axis shows SHAP values, while the vertical axis orders product attributes by their mean absolute SHAP values. Yellow indicates high, and purple indicates low attribute values. For categorical attributes, high represents “yes” and low represents “no” (Lundberg and Lee, 2017). Source: Authors’ own work
The S H A P summary plot shows a horizontal axis labeled “S H A P value (impact on model output)” ranging from negative 50 to 250 in increments of 50 units and a vertical axis listing fifteen product attributes. From top to bottom, the attributes are labeled “Calories,” “Price,” “Packaging size,” “Mean price of price promotions,” “Mean number of price promotions,” “Plain flavor (yes or no),” “Sugar content,” “Protein content,” “Fat content,” “Brand (yes or no),” “Fruit flavor (yes or no),” “Production method (organic yes or no),” “Other flavor (yes or no),” “Packaging material (glass yes or no),” and “Low fat option (yes or no)”. Each attribute line contains clusters of colored dots distributed horizontally. The dots range in color from purple to yellow, corresponding to low and high values of the analyzed product characteristics, as shown by the color scale bar on the right labeled “Value of analyzed product characteristic,” with “Low” at the bottom in purple and “High” at the top in yellow. The data for each product attribute is shown as follows: Attribute: Calories; Range: negative 50 to 0, S H A P Value: Medium, Range: 0 to 120; S H A P Value: Low. Attribute: Price; Range: negative 50 to 0, S H A P Value: Medium, Range: 0 to 70, S H A P Value: Low. Attribute: Packaging size; Range: negative 40 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Range: 10 to 40, S H A P Value: High. Attribute: Mean price of price promotions; Range: negative 10 to 10, S H A P Value: High, Range: 10 to 40, S H A P Value: Medium, Range: 40 to 100, S H A P Value: Low. Attribute: Mean number of price promotions; Range: negative 30 to 0, S H A P Value: Low, Range: 0 to 20, S H A P Value: Medium, Range: 20 to 90, S H A P Value: High. Attribute: Plain flavor (yes or no); Range: negative 20 to 0, S H A P Value: Low, Range: 20 to 90, S H A P Value: High. Attribute: Sugar content; Range: negative 50 to 10, S H A P Value: Medium, Range: 10 to 120, S H A P Value: Low. Attribute: Protein content; Range: negative 40 to 80, S H A P Value: Medium. Attribute: Fat content; Range: negative 60 to negative 20, S H A P Value: Low, Range: negative 20 to 70, S H A P Value: Medium. Attribute: Brand (yes or no); Range: negative 20 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Range: 10 to 40, S H A P Value: High. Attribute: Fruit flavor (yes or no); Range: negative 10 to 0, S H A P Value: Low, Range: 0 to 10, S H A P Value: High. Range: 10 to 30, S H A P Value: Low. Attribute: Production method (organic yes or no); Range: negative 30 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Attribute: Other flavor (yes or no); Range: negative 20 to 0, S H A P Value: High, Range: at 0, S H A P Value: Low. Attribute: Packaging material (glass yes or no); Range: negative 15 to 0, S H A P Value: High, Range: 0 to 10, S H A P Value: Low. Attribute: Low fat option (yes or no); Range: negative 10 to 0, S H A P Value: High, Range: at 0, S H A P Value: Low, Range: 0 to 10, S H A P Value: High.Bee swarm plot of the SHAP analysis. Notes: This graph presents individual data points without overlap, creating a “swarming” effect. It reveals the distribution, density and variation of data along a numeric variable more effectively than scatter or box plots. In SHAP analysis, it summarizes how top attributes impact the model's output. Each dot represents an instance on each attribute row. The horizontal axis shows SHAP values, while the vertical axis orders product attributes by their mean absolute SHAP values. Yellow indicates high, and purple indicates low attribute values. For categorical attributes, high represents “yes” and low represents “no” (Lundberg and Lee, 2017). Source: Authors’ own work
Extrinsic product attributes
Price was highly important in predicting yogurt sales. Special offers ranked fourth and fifth, while overall price was the second most influential attribute. As expected, more special offers with lower prices as well as lower regular prices drove higher sales. Packaging size was the third most important attribute in the model, with smaller sizes being preferred. Packaging material, however, had minimal impact on purchase decisions with glass packaging negatively affecting sales. Brands had minimal impact on the model as well, with private labels showing little influence. Furthermore, the attribute “organic” had a low impact on the model. Non-organic yogurts slightly boosted sales, while organic options negatively affected them.
Intrinsic product attributes
Calorie content was the most important nutrition fact influencing yogurt sales, with low-calorie options driving higher sales. Sugar content, ranked seventh, also showed that lower sugar levels increased sales, while higher levels reduced them. Medium protein levels were favourable, but high protein levels negatively impacted sales, ranking as the eighth most important attribute. Fat content was the least important nutrient attribute, with medium fat levels boosting sales while lower fat content negatively impacted the model output. The yogurt being a low-fat option was not found to be an important factor in the current model. Plain-flavoured yogurt had a vital impact on sales, raking as most important flavour attribute, while other flavours like fruit, vanilla, or hazelnut showed minimal influence.
Discussion
Forecasting of yogurt sales
In general, the results indicate the ability to produce high-quality forecasts of yogurt product sales in a real-world application using the proposed attributes available at the POS. A simple baseline method being outperformed by an ML algorithm is consistent with the findings of Eiglsperger et al. (2024).
Extrinsic product attributes
Price
As expected, more special offers with lower prices as well as lower regular prices drove higher sales, consistent with previous research (e.g. Hoek et al., 2017). Specifically, after the rising inflation rates in Germany, consumers were found to place the highest importance on the price of the product, which is in line with recent research (Hempel and Roosen, 2024).
Packaging
The finding that consumers prefer smaller sized yogurts may relate to Germany’s high proportion of one- or two-person households (Statistisches Bundesamt, 2024), while the low impact of packaging material aligns with prior research (Harwood and Drake, 2018; Oloyede and Lignou, 2021; Decker et al., 2021). This may reflect consumers' dissatisfaction regarding the current packaging landscape in the food market (Herrmann et al., 2022). The negative effects of glass packaging on sales are possibly due to convenience (e.g. lightweight) factors (Dilkes-Hoffman et al., 2019), despite glass being viewed as the most eco-friendly packaging option in Europe (Balzarotti et al., 2015; Friends of Glass, 2017). Recent research revealed that consumer knowledge is strongly related to their ability to select more environmental-friendly packaging options for food products, and that emotions have a strong impact on consumers' behavioural intention in this field (Drechsel et al., 2025), suggesting that those factors may have been influential in the current study.
Brand
The weak loyalty to private brand labels is contrary to earlier findings (e.g. Košičiarová et al., 2020). However, it aligns with more recent research by Fuduric et al. (2022), indicating consumers often prefer manufacturer brands over private labels for various product categories, including yogurt. Overall, the brand being a manufacturer or a private label one was not too important to consumers, indicating that concepts like brand image, or brand identity (i.e. Cuong, 2022; Acar et al., 2024), may not play a central role for yogurt sales.
Organic production
The low impact of the attribute “organic” aligns with research indicating consumers place little value on this aspect for yogurts (Brückner et al., 2023). However, non-organic yogurts slightly boosting sales, while organic options negatively affected them is surprising and contradicts previous findings suggesting that organic food products are generally preferred by customers (D'Adamo et al., 2025; Malissiova et al., 2022). Price sensitivity could explain this, as consumers might avoid the higher prices of organic yogurts due to the current rise of food costs and the connected growing importance placed on the price (Hempel and Roosen, 2024) as well as general consumer concerns regarding food prices (IFH Köln, 2024).
Intrinsic product attributes
Nutrition facts
The findings concerning nutrition facts contradict previous research, which highlighted the importance of low-fat and high-protein options (Brechelmacher, 2022; Gupta et al., 2022; Li and Dando, 2019) and suggested fat content was a key factor in purchase decisions (Mai and Hoffmann, 2012). However, the findings are in line with research from Gustafson and Rose (2023) suggesting that consumers pay more attention to nutrients (including calories) that should be avoided. The dislike for low-fat products may represent the general consumer perception that products with less fat content are less tasty (Oostenbach et al., 2019). Consumers’ healthfulness judgements of food products often rely on nutrition facts (Lusk, 2019), suggesting that in this study, calorie content seemed to be the biggest determinant for this. The high importance placed on low calorie content may reflect a general concern among consumers for choosing a yogurt option they perceive as healthy, thereby prioritizing this health aspect over other product attributes (Ballco and Gracia, 2022).
Flavour
The preferences in flavour extracted in this study contrasts with Gupta et al. (2022), who found fruity flavours to be most preferred. The high preferences for plain yogurts are in line with recent market developments in Germany where this type of yogurt has gained market share in the last years (Krost, 2025) and is often seen as the most “natural,” offering a pure taste (Chandan et al., 2017). Consumers typically value this sense of naturalness (Román et al., 2017), which may explain their preference for the plain option. Additionally, plain yogurt’s perceived naturalness is associated with greater perceived healthiness, supporting its popularity as a healthy choice (Saulais et al., 2023) and aligning with the finding that a low calorie content (which is better realized in plain yogurts) seemed to be important to consumers in this study.
Overview of yogurt attribute properties supporting high sales figures
Table 2 represents a comprehensive overview of the characteristics increasing and decreasing sales figures formed by the corresponding extrinsic and intrinsic yogurt attributes as interpreted based on the SHAP values of the forecasting model. This approach appreciates the complex interplay of these factors in a real-world shopping environment based on EPOS data. As suggested by the Total Food Quality Model (Brunsø et al., 2002), consumers seem to perceive a mix of intrinsic and extrinsic attributes at the POS. Thereby, quality judgements rely on different attributes that in turn drive purchase decisions. For the extrinsic attributes, price was found to be most important, while packaging material was least important. Calorie content was the most important attribute within the intrinsic category, while the product being a low-fat option was the least important. These findings give important insights into consumer food choice at the POS.
Extrinsic and intrinsic yogurt attribute properties increasing and decreasing high sales figures
Theoretical implications and managerial contributions, limitations and future research perspectives
Theoretical implications
This study suggests that selected product attributes effectively forecast perishable food sales. This is an interesting insight for forecasting sales of consumer products, as product attributes that are available and verifiable by consumers at the POS seem to be interesting antecedents for this purpose. SHAP values proved useful for interpreting ML predictions, making ML models more accessible for retail personnel. This insight could drive future ML studies by emphasizing model interpretability and deepening understanding of consumer food choice. Future research could apply this approach to other product groups or retailers.
Managerial contributions
Practitioners can benefit in several ways. First, food retailers can enhance sales forecasting by integrating these analyses, reducing the “black-box” perception of ML and improving data utilization. SHAP analysis provides insights into both sales trends and customer preferences. Second, food manufacturers can use these findings to guide product development, prioritizing high-impact attributes like low calorie content, plain flavour, and low sugar content. Combining these insights with external data, such as data from a statistical institute or a trade association, may further drive product innovation (Frau and Keszey, 2024). Third, marketers can refine strategies by focusing on attributes consumers value the most. For example, yogurt marketing should highlight low calorie content rather than low fat or high protein, as these attributes were less influential in purchase decisions. Communicating key product attributes effectively could increase consumer value and customer satisfaction and have positive impacts on sales, particularly, in highly competitive markets, like the yogurt market.
Limitations
Limitations of this study are that (1) the selected retailer represents a limited sample of German consumers, with slightly higher average incomes potentially influencing yogurt choices, even if the use of real sales data reduces the potential for biases, (2) this study focused solely on yogurt sales, (3) the data lacked consumer-specific information, (4) and while this study offers insights into yogurt purchasing behaviours in Germany, international applicability may be limited due to differing habits and food cultures.
Future research perspectives
Future research could address the bias issue mentioned above (1) by including data from various retailers, such as discounters and supermarket chains. Limitation (2) could be eliminated by exploring other product categories to assess the approach's effectiveness in future research. Furthermore, expanding the analysis to more attributes (e.g. health claims and packaging design) may uncover additional factors relevant to marketing and retail strategies. Combining sales or EPOS data with consumer insights (e.g. retail media data) could address limitation (3) by revealing deeper purchasing patterns and psychographic profiles of consumers. Finally, including international samples from various backgrounds and cultures could overcome limitation (4) of the current study.
Conclusion
This study investigated key drivers of consumers’ yogurt purchasing decisions, analysing extrinsic and intrinsic attributes driving high sales using a holistic approach. Four years of yogurt sales were examined with ML forecasting methods, incorporating price, flavour, packaging, brand, nutrition facts, and production type. A time series model predicted sales with an R2 score of 0.89, and was further interpreted using SHAP values. The use of SHAP values proved useful for interpreting the sales forecasting results. Those showed that “price” was the most crucial extrinsic attribute, with lower prices boosting sales, followed by smaller packaging sizes and low prices of price promotions as well as a high number of price promotions. “Calorie content” was the most influential intrinsic factor, with lower calorie yogurts leading to higher sales. This was followed by plain flavour and a low sugar content. Surprisingly, attributes typically linked to healthiness, such as low fat or high protein, reduced sales. A comprehensive overview of all the holistically tested attributes supporting high sales figures was created.
These findings provide valuable insights into consumer behaviour at the POS showcasing the use of SHAP as a suitable method for investigating food attribute importances. This could help retailers to better understand the product attributes that drive sales. Product developers could also benefit from the findings by gaining insight into the attributes that are important to consumers and designing product innovations accordingly. In addition, marketers of food products and food retailers could use these findings to adjust their marketing and communication strategies. Although the study portrays some limitations, such as a limited sample of German consumers due to the selected retailer, it could guide future research that examines different product categories and retailers on a national and international level by suggesting a suitable method for analysing and interpreting sales data, as well as the importance of different product attributes and their complex interplay.
Appendix
Optimized hyperparameters with the according range of values and explanatory notes for the eXtreme Gradient Boosting (XGB) model
| Parameter | Value | Notes |
|---|---|---|
| n_estimators | Lower bound: 500 Upper bound: 1,000 Step: 50 | Number of gradient boosted trees |
| max_depth | Lower bound: 2 Upper bound: 1,000 Step: 10 | Maximum tree depth of a base learner |
| learning_rate | Lower bound: 0.025 Upper bound: 0.3 Step: 0.025 | Learning rate/eta |
| gamma | Lower bound: 0 Upper bound: 1,000 Step: 1 | Minimum loss reduction for a partition on a leaf node |
| subsample | Lower bound: 0.05 Upper bound: 1.0 Step: 0.05 | Subsample ratio of a training instance |
| colsample_bytree | Lower bound: 0.005 Upper bound: 1.0 Step: 0.005 | Subsample ratio of columns when constructing each tree |
| reg_lambda | Lower bound: 0 Upper bound: 1,000 Step: 1 | Weight for L2-regularization |
| reg_alpha | Lower bound: 0 Upper bound: 1,000 Step: 1 | Weight for L1-regularization |
| Parameter | Value | Notes |
|---|---|---|
| n_estimators | Lower bound: 500 | Number of gradient boosted trees |
| max_depth | Lower bound: 2 | Maximum tree depth of a base learner |
| learning_rate | Lower bound: 0.025 | Learning rate/eta |
| gamma | Lower bound: 0 | Minimum loss reduction for a partition on a leaf node |
| subsample | Lower bound: 0.05 | Subsample ratio of a training instance |
| colsample_bytree | Lower bound: 0.005 | Subsample ratio of columns when constructing each tree |
| reg_lambda | Lower bound: 0 | Weight for L2-regularization |
| reg_alpha | Lower bound: 0 | Weight for L1-regularization |


