SensMap R Package and SensMapGUI Shiny Web Application For Sensory and Consumer
SensMap R Package and SensMapGUI Shiny Web Application For Sensory and Consumer
DOI: 10.1111/joss.12809
Journal of
1
Higher Institute of Accounting and Business
Administration (ISCAE), University of Abstract
Mannouba, Tunis, Tunisia
This work addresses the theory of External Preference Mapping technique (EPM)
2
Statistics Program, Department of
Mathematics, Statistics, and Physics, College
that reliably gives a mapping of human perceptions' ratings considered as subjective
of Arts and Sciences, Qatar University, Doha, data onto objective descriptions generally obtained from measurable analytic data.
Qatar
An R package named SensMap is made available to facilitate the adoption of the
Correspondence EPM technique in different research fields and to propose, in addition to classical fea-
Ibtihel Rebhi, Higher Institute of Accounting
and Business Administration (ISCAE),
tures, advanced strategies for map visualization and its stability enhancement. The
University of Mannouba, Tunis, Tunisia. novelty of SensMap is to provide options in sensory space dimension reduction
Email: [email protected]
methods as well as options in consumers' likings prediction models based on sensory
descriptors. The fitting quality of these models can be evaluated using several infor-
mation criteria. Moreover, SensMap provides a methodology to quantify and assess
the stability of preference maps from different employed strategies using a computa-
tional algorithm that consists in calculations of distances between maps based on
resampling approach. A small part in this paper was devoted to evaluate the effi-
ciency of the implemented stability approach by a simulation study and by application
to real data from food science field. To make easier the conduction of the multiple
types of analysis without requiring high programming knowledge, a very intuitive
Graphical User Interface named SensMapGUI is implemented on the SensMap pack-
age. It is an R-developed shiny web-tool that produces results and graphics quickly
and efficiently. The tool is made available at the following address https://cran.r-
project.org/web/packages/SensMap/index.html and is dedicated for all sensory prac-
titioners and can be widely used by researchers who need subjective to objective
data mapping.
Practical Applications
Researchers and practitioners frequently require to understand human behaviors by
measuring their perceptions and searching for the factors that drive their opinions.
The SensMap R package is made available to provide a data visualization map, to
allow different analysis strategies and to make available a selection process of the
best mapping. The tool can be used through the free and open-access R software by
all sensory scientists and practitioners. SensMap will be regularly updated to allow
for changes in dependent R packages and will continue to add new features about
mapping. The novelty of the package consists in his incorporation of a nicely
designed and easily accessible graphical interface named SensMapGUI that hides all
technical complexities for the non-R users. It is a web-tool once implemented on line
can be used on any device like tablets, iOS applications and Android without need to
tedious coding. The tool can also be used by all researchers who need to establish a
relationship between subjective and objective data. It can serve in some many inves-
tigations such as the evaluation of human state of stress by analogy with their
electro-dermal activity measurements, the explanation of old persons hearing ratings
toward road noise on the basis of traffic sound measurements data, the evaluation of
consumers' preferences toward some products in the market, etc.
The particularity of SensMap that offers an evaluation process of consider E = {1, …, 9} the 9-point-hedonic-scale of integer generally
maps stability. In fact, EPM suffers from lack of stability according to used in food products sensory analysis. Hence, Y ℝPC .
high variability of hedonic judgments and variations of consumers' On the other side, another dataset is needed where columns are
samples. Literally, treatment of individual preferences tackles the issue assimilated to sensory descriptors and three additional variables
of repeatability of consumer judgments: the stability of hedonic judg- including products, panelists and sessions. The descriptors are sensory
ments is not obvious as consumer measures are subjective and do not attributes of products evaluated by scores given by trained panelists.
have the same preferences (Greenhoff & MacFie, 1994). Also, strong The scale of the sensory intensity value is defined according to the
influence of experimental factors influences consumer ratings stabil- nature of the product, in some many cases it is considered from 1 to
ity. The method of data collection affects the heterogeneity of data. 9 of integer. For sensory data, we consider the covariance matrix for
One consumer will not give the same scores of appreciation to the each product based on all panelists and the evaluation times
same set of products at two tasting sessions. This may be due to many (sessions).
reasons such as the rank-tasting product, the background effect (if the Let then X ¼ ðxv ðpÞÞ denote the sensory data matrix where v {1,
previous product was very misappreciated, this product may be over- …, V} are the measured characteristics of products. Indeed, X data is
rated) and the moment of tasting (that from one day to another or the average table obtained from the ranking of the entire jury to one
from one moment to the other, the consumer does not enjoy the product during all sessions. Hence, X ℝPV . X can also contain physi-
same flavors). This variability makes maps instable and preference cochemical parameters as instrumental measured characteristics of
level lines more erratic. Hence, SensMap was developed essentially to products.
tackle such criticisms. It proposes a smoothed version of the map per-
formed through a local polynomial regression on the curves of prefer-
ence level using LOESS algorithm (Cleveland, 1979) which ensure a 2.2 | Steps of EPM construction in SensMap
more stable map. In order to evaluate the maps smoothing and stabi-
lizing, a comparison approach was suggested and evaluated in Sens- In SensMap, the “PrefMap” function allows to construct a bridge
Map. It consists in a computational algorithm that draws randomly between Y and X that would help to predict the score of the consumer
several times maps obtained from two additional sub samples from preference based on descriptions of the perceived products. The dif-
the original consumers sample and computes at each time the dis- ferent steps needed to implement a classic EPM as well as options
tances of preferences between them before and after smoothing. The proposed by “PrefMap” function are described. The plots illustrating
strategy with an overall lower distance than the other is preferred. In each step are displayed using SensMap R1 package (Figure 1).
this paper, the efficiency of the approach was assessed through simu-
lation study and application to real data set. Step 1: The first step of EPM consists in performing a dimension
In another hand, to make easy the use of SensMap functionali- reduction method on X. provides A choice between three
ties, a nicely designed GUI is provided. It is a user-friendly shiny appli- dimension reduction methods is provides by SensMap to
cation that allows a quick evaluation especially for non-R users. To obtain F namely Principal Component Analysis PCA, Multiple
obtain SensMap package, the user have to install the latest R program Factor Analysis MFA and Canonical Correlation Analysis CCA.
version on his computer from http://cran.r-project.org/ and download Let us denote by F the matrix of the first two principal com-
the IDE (Integrated Development Environment) RStudio from http:// ponents of the reduced data, that is, F1 and F2 such as
www.rstudio.com/ide/download/desktop. The package is fully docu- F ℝPJ for J = 2. Hence F = (F1, F2). The dimensions
mented, details on functions and application are found in the Tutorial describe the product attributes and build the perceptual sen-
available on the dedicated web page https://cran.r-project.org/web/ sory space. The sensory characteristics are defined by their
packages/SensMap/index.html. Also, the Github subversion system positions in the space defined by the reduction matrix F. In
https://github.com/ hosts the SensMap package. fact, PCA method is the classically used one to create a geo-
The paper is organized as follows: related functions with mathe- metrical space for data visualization (Figure 1, top left). It is
matical background about SensMap are detailed in Section 3 and dif- performed to extract the most information from the whole
ferent illustrations are given in Section 4. quantitative sensory data. The sensory space corresponds to
the correlations between attributes. However, in the case
that the user disposes of data described as groups of vari-
2 | T H E O R Y O F E X T E R N A L P RE F E R E NC E ables, the use of MFA is recommended. Two whole groups
MAPPI NG of variables will be considered: X as a sensory group and Y as
hedonic group. MFA balances these groups in the analysis
2.1 | Notations using a weighting method, and the sensory space defined
corresponds to the maximum common information shared
Let Y ¼ ðyc ðpÞÞ be the P C hedonic data matrix such that yc(p) is the between the two groups. Consumers preferences are
score given by the cth consumer to the pth product. Hence p {1, …, regressed on the perceptual space provided by factors from
P}, c {1, …, C} and yc(p) E the liking score set. We commonly MFA. This map referrers to PrefMFA performed by
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
4 of 17 Journal of REBHI AND MALOUCHE
Sensory Studies
F I G U R E 1 Steps of External Preference Mapping construction. (Top left) Biplot representing the projection of sensory descriptors and
products on PCA factor map. (Top right) Grid of discretized sensory space. (Middle left) Predicted scores of one individual. (Middle right)
Preferences of one individual. (Bottom left) Predicted scores of all individuals. (Bottom right) Preferences of all individuals corresponding to the
external map
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
REBHI AND MALOUCHE Journal of 5 of 17
Sensory Studies
X
l
yc ¼ α þ s ZGAMj , λ þ ϵc
j¼1
yc ¼ f ðFðXÞÞβc þ ϵc ¼ f ðF Þβc þ ϵc , 8 c ¼ 1, …, C ð1Þ
f ðEðyc ÞÞ ¼ α þ ZGLM β þ ϵc 1 if ^
yc ðkÞ ≥ yc
ϕc ðkÞ ¼
0 otherwise
where ZGLM denotes the matrix of the predictors F1, F2, F21 , F 22
and F1 F2. f is the link function between the mean of the response For each c = 1, …, C the vector ϕc ¼ ðϕc ðkÞ, k ¼ 1, …, K Þ f0, 1gK
variable and the linear combination of the explanatory variables. The denotes the cth preference space of the consumer c (Figure 1, middle
proposed expression of each consumer in SensMap is given using right panel). Indeed at this step, an option of removing predictions
identity link function for Gaussian distribution. ^yc ðkÞ that are not in the set of liking scores E is provided by “Pre-
Alternatively, Bayesian models (Congdon, 2002) were introduced fMap” function. It will be replaced by an NA in the next calculations
using different strategies when sampling the posterior distribution. and it will be then skipped. The new parameter is denoted in the func-
Estimation of consumer preferences yc is based on observed informa- tion by nb–NA. It can be computed at each grid-point gk according to
tion. Bayes rule allows calculating how likely each potential estimate the number of consumers. Some statistics about this indicator are
yc given the observed information. Assume the usual regression model made available. The lower is nb–NA, the better is the quality of predic-
yc = α + Zβ + ϵc;ϵc N(0, σ2) Bayesian model returns a posterior tion. It proves that the estimated regression was able to predict liking
sample simulated from the posterior distribution of the linear regres- scores into the set E which is already a nice performance of the esti-
sion model with Gaussian errors. It will be simulated from the poste- mated models.
rior of (β, σ2) using this informative prior such as β N(b0, B0) and
σ2 Γ(c0/2, d0/2) where b0 is the prior mean of β, B0 is the prior pre- Step 4: Thereafter, the C prediction surfaces are superposed one
cision matrix of β (the inverse of the variance–covariance matrix), c0/2 over the other and construct the prediction map (Figure 1,
is the shape parameter for the inverse Γ prior on σ2 and d0/2 is the bottom left panel). In addition, the C preference spaces
scale parameter for the inverse Gamma prior on σ2. This type of already divided into areas of preference and rejection are
modeling is worth to be developed in further studies. superposed one over the other and construct a
3-dimensional map as shown in Figure 2 which corresponds
Step 3: In the third step, a prediction space generated by (F1, F2) is to the output of EPM. The x and y coordinates correspond
established for each consumer. In fact, a set of points of the respectively to F1 and F2 and the z-axis represents the num-
space E ðF Þ is considered (Figure 1, top right panel). The grid ber of consumers computed as follows
of the coordinates of K points is denoted by G ⊆ E ðF Þ such as
G ¼ fgk , k¼ 1, …, K g. Let us denote by hc the function linking
the sensory data and the hedonic scores for which the esti- 1 X C
ϕk ¼ ϕ ðkÞ8k ¼ 1, …, K
mation corresponds to cth predicted score of the consumer j C j c¼1 c
c at each point gk of the discretized space (Figure 1, middle
left panel). Hence
Step 5: Hence the association between hedonic and sensory data is
resulting in:
^c ðg Þ
^yc ðkÞ ¼ h 8k ¼ 1,…,K, c C
k
At each point of the grid of each consumer, the predicted score is EPMðY, X Þ ¼ fϕk ,k ¼ 1,…, K g
compared to the mean liking score given by each consumer to all
products defined as A projection in two-dimensional space (Figure 1, bottom right
panel) is obtained by only computing the average on a subset of
1X P
consumers who are considered as knowledgeable consumers, that
yc ¼ y ðpÞ
P p¼1 c is, the consumers for whom predicted liking score is higher than
the mean liking score that was considered as a reference level.
Thereafter, once EPM is performed, we can see the space divided
If ^yc ðkÞ ≥ yc , it is considered as a point of preference on the discre- into two main zones: a zone of preference (orange zone) where
tized space labeled by 1 otherwise it is a reject point labeled by level lines match with the percentage of consumers that appreci-
0. Hence, a finite sequence of 0 and 1 numbers is obtained. Therefore, ate highly the products situated in the orange zone and agree
we have with respect to their maximum liking. Conversely, the blue dark
region corresponds to the zone of reject and indicates percentage
ðϕc ðgk Þ ¼ ϕc ðkÞ, c ¼ 1,…, C and k ¼ 1, …, K Þ f0, 1gCK
of consumers that prefer lowly the products located in the
where green zone.
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
REBHI AND MALOUCHE Journal of 7 of 17
Sensory Studies
2.3 | Smoothed version of EPM visualized EPM performed on the whole sample of consumers can be
changed when performed on subsamples of consumers.
Additionally, a smoothed version of the map is proposed by SensMap Let N be a number of random extracted subsets. Then for each
by performing a Locally weighted regression smoothing (LOESS) j = 1, …, N, two samples Cj1 and Cj2 from the set of consumers C = {1,
(Cleveland, 1979) on the curves of preference level of the map. In fact, …, C} are selected at each time such that Cj1 [ Cj2 ¼ C, Cj1 \ Cj2 ¼ ; and
the quality of fitting using this model was roughly studied and com- j Cj1 j¼j Cj2 j¼ N=2. The two sub matrices Y j1 ℝPC=2 and Y j2 ℝPC=2
pared in (Rebhi & Malouche, 2017a). Results have shown that the such that Y ¼ Y j1 j Y j2 are considered.
smoothed map was proposed to make level lines less erratic and then At each sampling, two maps are performed: one from the relation-
make easier the perception of consumers tendencies. At each point in ship (Y1, X) and the second (Y2, X) respectively denoted by
n o
the hedonic data, a low-degree polynomial is fit to a subset of the data, EPM1 ¼ EPM Y j1 , X ¼ ϕjk,1 , k ¼ 1,…, K
n o
with explanatory variable values near the point whose response is being and EPM2 ¼ EPM Y j2 , X ¼ ϕjk,2 ,k ¼ 1,…, K .
estimated. The polynomial is fit using weighted distances, giving more
weight to points near the point whose response is being estimated and
less weight to points further away. This provides a flexible approach to 3.2 | Stability indicators
represent the consumers preferences. Figure 3 shows the smooth sur-
face of EPM. This version can be obtained for the several proposed Since EPMi, i = 1, 2 are sets of predicted probabilities on the same
strategies of EPM: when varying the dimension reduction method, the grid of points from the projection space, we compute between the
prediction model and when considering or not the nb–NA indicator. two preference maps EPM1 and EPM2 for j = 1, …, N an average
squared distance of preferences (number of consumers for whom pre-
dicted liking score is higher than mean liking) named ASDPfj and an
3 | STABILITY MEASUREMENT OF average squared distance of predictions for j = 1, …, N named ASDPrj
E X T ER N A L P R EF E R E N C E M A P P I N G recorded at each point of the discretized plane and given respectively
8j = 1, …, N and 8k = 1, …, K by
3.1 | Sampling
K 2
1X
ASDPfj ¼ ϕj ϕjk,2 ð3Þ
One of the main goals of the developed tool is to find a metric to K k¼1 k,1
measure the stability of a preference map. The “StabMap” function
K 2
generates an indicator of map's stability that allows the comparison of 1X
ASDPrj ¼ yc ðk, 1Þj ^
^ yc ðk,2Þj ð4Þ
given maps obtained from different strategies. K k¼1
The suggested method is a computational one which consists of
an algorithm that draws randomly maps for several times from two
additional subsamples derived from the original sample and computes Once N random selections are performed we obtain a sample of
distances between them. The task like to test how much the N of ASDPf, that is; ASDPf1, …, ASDPfN or a sample of N of ASDPr,
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
8 of 17 Journal of REBHI AND MALOUCHE
Sensory Studies
that is; ASDPr1, …, ASDPrN. Their average is then computed respec- structures from QR, GAM, GLM and Bayes models. Following the
tively as in (5) and (6) and will be denoted in the rest of work as ASDPf same path of the denoising study presented in (Rebhi &
for distances between preferences Malouche, 2017b), only the true signal was taken without consider-
ation of noise and this based on the structure of fixed effect model of
1X N
PCA proposed by (Caussinus, 1986) that considers data as a structure
ASDPf ¼ ASDPfj ð5Þ
N j¼1 of a signal corrupted by noise.
Hence, all consumers are assumed having the same preferences
as shown in the example of Figure 4 (left). Then, to generate the
and the ASDPr for distances between predictions of the esti- Y matrix, a Gaussian noise ϵ N(0, σ2) is added to each structure. Dif-
mated EPM ferent levels of σ2 variance are considered. A small variance indicates
that the consumers preferences are near from the mean value
1X N
whereas a high variance implies that the preferences are scattered
ASDPr ¼ ASDPrj ð6Þ
N j¼1 which makes data very noisy. Once the whole structures of each
model are obtained, Y data is constructed and maps are visualized by
mapping between sensory real data X and the new hedonic simulated
A preference map is stable if the computations of ASDPf or data (Figure 4, middle). Then, LOESS is performed to compare maps
ASDPr are close. For several mapping strategies, the process provid- before and after smoothing (Figure 4, right).
ing a lower difference is preferred. Thereby, the stability of the map The structure of Y data is simulated by varying several parameters:
can now be assessed using this computational method that informs
about the maps' rapprochement. • The number of consumers p based on different combinations
(p = 60, 200, 1,000)
• The standard deviation σ of the noise from (0.5, 1, 2)
3.3 | Evaluation from simulation study • For each combination of p and σ parameters, n sampling (500) are
generated and their average is considered.
In this section, the stability process suggested by the developed tool • Simulations are tested by considering several configurations for
is assessed by a simulation study and then by application to real data. each type of model.
As a way to simulate Y hedonic data, the idea is to start from a model
which parameters are obtained from results on real dataset. The pre- ASDPf was computed between the obtained maps from subsam-
diction is performed by the PCA sensory space and examples of real ples in one hand and from the maps of the same subsamples after
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
REBHI AND MALOUCHE Journal of 9 of 17
Sensory Studies
F I G U R E 4 Example of External Preference Map Construction from simulated Y data obtained for quadratic model: consumers have the same
preferences (left), map representation from constructed Y data (middle), map after smoothing (right) for σ2 = 1
T A B L E 1 ASPDf before and after LOESS smoothing computed for QR, GAM, GLM, and Bayes models over 500 simulations. Results are given
for different numbers of consumers (c) and standard deviation of noise (σ)
1,000 0.5 0.66 0.07 3.56 0.95 2.48 0.69 0.05 0.04
1,000 1 1.31 0.37 4.23 1.02 3.49 1.86 0.42 0.32
1,000 2 2.86 1.30 6.83 2.69 4.03 1.01 0.66 0.56
200 0.5 4.04 0.61 12.34 1.39 7.58 3.35 0.34 0.27
200 1 21.88 5.38 13.99 6.97 13.91 8.59 2.43 1.79
200 2 35.20 13.38 25.94 12.55 16.13 24.81 6.07 5.21
60 0.5 11.99 1.80 27.45 7.50 27.46 2.40 1.14 0.85
60 1 39.64 13.96 20.28 11.24 36.60 10.15 11.64 8.96
60 2 40.33 18.68 47.40 26.32 41.62 17.04 14.72 11.56
smoothing in the other hand. The variations of the different parame- 4 | THE USE OF SENSMAP AND
ters are considered as shown in (Table 1). Results show that ASDPf S E N S M A P G U I : P R A C T I CA L A P P L I C A T I O N
after smoothing are smaller then those obtained before in almost all
situations. The main characteristic of the stability algorithm observed In this part, real data sets are analyzed using SensMap and the imple-
in all simulations is giving particularly good results when the data are mented shiny application SensMapGUI. In fact, results obtained from
very noisy. It reduces distances to make consumers appreciations as the different implemented functions in SensMap can be easily
closer as possible. The ASDPf increases with the increase of σ: the obtained from the SensMapGUI without need to programming. The
noisy the data is, the higher ASDPf is. In another hand, when the num- GUI produces graphical displays of consumer and sensory data analy-
ber of consumers c is large (1000), the variations in distances are less sis via Internal and External mapping techniques. It offers more com-
important for almost all models even without smoothing. The behav- prehensive features, nice static and dynamic plots and a wide variety
ior regarding the Bayesian model is worth to be noted, in fact the dif- of EPM performing and stabilizing as detailed previously.
ferences between ASDPfBayes and ASDPfLoess
Bayes are very smaller, so that The GUI was developed throughout shiny2 R package. The tool is
Bayes model gives a very stable maps for which no need to be configured for analysis of a large amount of sensory data
denoised. This result is worth to be developed in another study. (size 70 KB) and consumer data (size 30 KB).
The main proved result by the implemented approach, is that SensMapGUI is made available through the following addresses:
ASDPf after smoothing are still lower than before, even by varying
the number of consumers and for different values of noise standard • On the SensMap R package published on the Comprehensive R
deviation. When comparing the performance of the different models, Archive Network (CRAN) at the following address https://cran.r-
predictions using GLM and QR make closer preferences than those project.org/web/packages/SensMap/index.html.
obtained from GAM (Rebhi & Malouche, 2017a). The smoothing and • The R codes are also available in Github subversion system reposi-
the removal of noise reduce the gap between the maps and bring tory at this address https://github.com/IbtihelRebhi/SensMap.
closer consumer preferences. • On Shiny io servers https://ibtihelrebhi.shinyapps.io/SensMapGUI/.
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
10 of 17 Journal of REBHI AND MALOUCHE
Sensory Studies
• The documentation of the package is exhaustive, details on func- Figure 6. The interpretation is generally performed by analogy to the
tions and application are found on the dedicated web page https:// biplot resulting from PCA shown on the right of Figure 6 which can be
cran.r-project.org/web/packages/SensMap/SensMap.pdf. also easily obtained from the GUI.
The exploration of the map (Figure 6, right) is conducted based
Figure 5 shows how looks our interface that can be easily on each level line where is located an optimum product. The con-
acceded also through the web. sumers forming a preference level line where is located an optimum
product are depicted and characterized. Segmentation of consumers
according to optimum products in EPM and characterization of each
4.1 | Data sources cluster can be obtained using the defined parameters in PrefMap func-
tion. An analogy with most liked products characteristics is performed
As an example from food science, Biscuits data sets described in on the basis of the biplot obtained from PCA on sensory data
(Pagès et al., 2007) are used. Data were easily uploaded on SensMap- (Figure 6, left). An example of interpretation is detailed, four main
GUI. Generally for all sensory and consumer data, the application groups of consumers are depicted.
accepts a comma, Tabulation or semicolon delimited text file. Con-
cerning sensory data uploading, the user introduces a table crossing
panelists, products, sessions and sensory attributes. SensMapGUI 4.2.1 | First group of consumers
automatically detects the variable names and exports them into
related fields. Then, the user chooses the corresponding variable for 75% of consumers (220) appreciate highly Gala (produced by
each field. For consumer data uploading, since all variables are quanti- Danone Group in Pakistan) and Palet Breton (produced by Petit
tative, it is easier to display it, the same when introducing Déli manufacture in France). In particular, Palet Breton was highly
physicochemical data. appreciated by almost all French consumers (93.3%), however,
Gala was appreciated by only half of Pakistani hedonic
panel (48.6%).
4.2 | Practical application and map visualization When examining the characteristics of these products, Gala was
from SensMap perceived to have a caramel and vanilla taste and odor. Palet Breton is
characterized essentially by a salted taste. The odor and taste of but-
In practice, to conduct an EPM on the biscuits data, it is possible to ter and eggs make consumers totally satisfied by this type of cookie.
use the shiny application as well as the PrefMap R function detailed in The high number of French consumers that appreciate this product is
Appendix A. The output is the visualized map shown on the left of probably explained by their origin.
F I G U R E 6 Characterization of products by PCA performing on sensory data (left), characterization of consumers preferences through
mapping performed from complete quadratic model (right)
FIGURE 7 AIC, R2 and F-stat computed for all consumers from different models
4.2.2 | Second group of consumers appreciated for its crumbliness taste and thick form. However, it was
not highly perceived by French panel.
55% of consumers (161) appreciate Sooper (Pakistani product made
by the English Manufacturers Biscuits EBM, the leader on the 4.2.3 | Third group of consumers
Pakistani biscuits market). Almost of consumers of this category are
from Pakistan (76.3% from Pakistani panel vs. 24% from French Between 40 and 50% of consumers (117 and 147) appreciate Petit
panel). Compared to other Pakistani products, Sooper is the most beurre (French product) for its softness taste, Sprits (French product)
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
12 of 17 Journal of REBHI AND MALOUCHE
Sensory Studies
for its crumbliness taste, Milco (Pakistani product) for its odor and 4.2.4 | Fourth group of consumers
taste milk and Petit Brun (French product) for its vanilla taste. These
products were appreciated by approximately half French and half 35% (102) of consumers appreciate Candi Lite (Pakistani product). It
Pakistani consumers. On the whole, the two samples do not was the less rated specially by French consumers (20.6%). In contrary,
differ much. half of the Pakistani population appreciate Candi Lite. Specially, this
FIGURE 8 Preferences of consumers projected on PCA sensory space from different strategies by SensMapGUI
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
REBHI AND MALOUCHE Journal of 13 of 17
Sensory Studies
category of consumers appreciates citron taste and odor which were when n attends 50, it corresponds to 1.75 s. The computing calcula-
totally refused by others. tions are longer when n values attend 100.
In SensMapGUI, the user has also the choice to introduce the
number of selections of subsamples. Comparisons on biscuits data are
4.3 | Map stability evaluation from variations on performed over 100 number of subsamples selections.
prediction models Models performance can be compared using AIC, R2, F-stat and
nb–NA criteria provided by the tool. Bayesian models are excluded
Because the traditional EPM is not explicit in representing correct from this comparison since it has unique measures of quality. The
relationship for all datasets, the advanced options presented in Sens- main obtained results in Figure 7 show the high performance of
Map allow for researchers to choose the corresponding method to LOESS in term of the different parameters calculations. LOESS
build the sensory space and to predict consumers preferences. This recorded the lower values of AIC, higher values of R-squared and
can be performed before and after smoothing using LOESS. The F- statistic as represented in Figure 7. In addition, it recorded the
SmoothMap R function detailed in Appendix A.2 can be used. lower values of nb–NA predictions outside the liking scores space.
These different strategies can be compared from a visual point In the other side, GLM outperforms QR and GAM models. It is
view in one side and using the proposed stability approach using Stab- indicative of good fit with lower AIC values and higher R-squared
Map R function detailed in Appendix A.3 can be used. The latter con- and F-statistic than QR and GAM. In term of nb–NA, it recorded also
tains the n argument used to introduce the number of selections of lower values of predictions outside [0:10]. These results were
random samples from hedonic data for which maps are compared discussed and thoroughly detailed in previous work (Rebhi &
before and after LOESS smoothing. The output is the calculations of Malouche, 2017a).
the stability indicator ASDPf computed between maps before and After that, maps obtained from these different prediction models
after LOESS smoothing for each type of prediction model. The are compared. From a visual point of view, results in Figure 8 show
elapsed computing time for the calculations varies according to the that maps from different strategies visualized after smoothing build a
value of n. If n is very small, the computing time is close to 0 and more stable sensory space where the preference zones appear more
F I G U R E 9 ASDPf calculations over 100 selections for quadratic, GAM, GLM, and Bayesian models before and after LOESS smoothing by
SensMapGUI
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
14 of 17 Journal of REBHI AND MALOUCHE
Sensory Studies
clear and net. Level lines are less erratic than those obtained from CONFLICTS OF INTEREST
noisy data. The smoothing filters the map by removing noise while The authors have no conflicts of interest to disclose.
maintaining details in image. Bayes models give already a stable sen-
sory space without smoothing. Regularization of level lines is obvious DATA AVAILABILITY STAT EMEN T
and clearance of preference zones makes map simple to design. This The data that support the findings of this study are openly available in
result is worth to be discussed and developed in future studies. Jeu de données biscuits at https://husson.github.io/data.html.
Visual results presented in Figure 8 are in agreement with ASDPf
calculations (Figure 9). ASDPf calculations are still lower than before OR CID
smoothing for all prediction models. This result is also in agreement Ibtihel Rebhi https://orcid.org/0000-0001-7360-0224
with simulation results given in Section 3. The stability approach
implemented in SensMap proves that smoothing allows for closer pre- ENDNOTES
dictions of the underlying model and so helps reducing the high vari- 1
https://cran.r-project.org/web/packages/SensMap/index.html.
ability of consumers preferences and then stabilizing maps. 2
https://shiny.rstudio.com/.
RE FE RE NCE S
5 | C O N CL U S I O N
Carroll, J. D. (1968). A generalization of canonical correlation analysis to
three or more sets of variables. Proceedings of the 76th Annual Conven-
SensMap R package is made available to facilitate the use of EPM tion of the American Psychological Association, pp. 227–228.
technique by a wide range of researchers and industrial communities. Carroll, J. D. (1972). Individual differences and multidimensional scaling. In
This tool helps exploring and visualizing the relationships between R. N. Shepard, A. K. Romney, & S. B. Nerlove (Eds.), Multidimensional
scaling, theory and applications in the behavioral sciences (Vol. 1,
consumers preferences and characteristics of product using several
pp. 105–155). New York: Seminar Press.
strategies. The novelty is that SensMap includes an easy-to-use Caussinus, H. (1986). Models and uses of principal component analysis (with
graphical user interface named SensMapGUI intended for all sensory discussion) (pp. 149–178). Leiden: DSWO Press.
scientists and practitioners. This application offers more comprehen- Christensen, R. H. B., Brockhoff, P. B., Kuznetsova, A., Birot, S., &
Stachlewska, K. A. (2016). sensR package. Retrieved from https://cran.
sive features, nice static and dynamic plots and a wide variety for
r-project.org/web/packages/sensR/index.html
EPM performing. It helps conducting multiple types of analyses and Cleveland, W. S. (1979). Robust locally weighted regression and smoothing
comparing results with informations that help selecting the best anal- scatterplots. Journal of the American Statistical Association, 74(384),
ysis. The proposed features such as tools for comparing performance 829–836.
Congdon, P. (2002). Bayesian statistical modelling. Measurement Science
of models prediction as well as studying EPM stability. It is specifically
and Technology, 13(4), 643.
constructed to implement a new stability approach based on the Danzart, M. (1998). Quadratic model in preference mapping. 4th Senso-
comparison of preference distances computed between maps per- metric meeting, Copenhagen, Denmark, August.
formed from subsamples of consumer data, before and after LOESS Escofier, B., & Pages, J. (1998). Analyses factorielles simples et multiples:
Objectifs, méthodes et interpretation. Paris, France: Dunod.
smoothing.
Greenhoff, K., & MacFie, H. J. H. (1994). Measurement of food prefer-
Thus, a smoothing version of EPM is provided by denoising the ences. In H. J. H. MacFie & D. M. H. Thomson (Eds.), Preference map-
curves of preference levels using the local polynomial regression. This ping in practice. London, UK: Chapman & Hall.
version seems to be more stable where the preference zones appear Hastie, T. J., & Tibshirani, R. J. (1990). Generalized additive models. London:
Chapman and Hall. pp. xv + 335.
more clear and net while maintaining details in the map. So that, the
help.xlstat. (2022). Cartographie des préférences dans Excel. Retrieved from
proposed stability approach in SensMap allows for closer predictions
https://help.xlstat.com/fr/6561-preference-mapping-excel-tutorial
of the underlying model and for reducing the differences and remov- Joliffe, I. T. (2002). Principal component analysis second edition. New York,
ing noise from consumer preferences. NY: Springer series in statistics.
The efficiency of stability approach was assessed by the simula- Kuznetsova, A., Brockhoff, P. B., & Christensen, R. H. B. (2016). SensMixed
R package. Retrieved from https://cran.r-project.org/web/packages/
tion study which implies the robustness of the implemented approach.
SensMixed/index.html
Finally, with the help of SensMap package, many perspectives to this McCullagh, P., & Nelder, J. (1989). A generalized linear models (2nd ed.).
study arise such as the development of the results obtained from London: Chapman and Hall.
Bayes modelization. The package is freely available through https:// Pagès, J., Bertrand, C., Ali, R., Husson, F., & Lê, S. (2007). Sensory analysis
comparison of eight biscuits by French and Pakistani panels. Journal of
cran.r-project.org/web/packages/SensMap/index.html.
Sensory Studies, 22(6), 665–686.
Peltier, C., Brockhoff, P. B., Visalli, M., & Schlich, P. (2014). The MAM-CAP
ACKNOWLEDGMENTS table: A new tool for monitoring panel performances. Food Quality and
François Husson, professor in statistics at Department of Statistics Preference, 32(Part A), 24–27.
Rebhi, I., & Malouche, D. (2017a). Decision making about products devel-
and Computer Science in AgroCampus Ouest Rennes is acknowledged
opment through consumer preferences modeling based on descriptive
for his supervision, ongoing support and advises in sensory analysis characteristics of products. Proceedings of ACS/IEEE International Con-
field. ference on Computer Systems and Applications AICCSA.
1745459x, 2023, 2, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/joss.12809 by Elson Tavares Filho - University Estadual De Campina , Wiley Online Library on [19/10/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
REBHI AND MALOUCHE Journal of 15 of 17
Sensory Studies