A Real-time Targeted Recommender System
for Supermarkets
Panayiotis Christodoulou
1
, Klitos Christodoulou
2
and Andreas S. Andreou
1
1
Department of Electrical/Computer Engineering and Informatics, Cyprus University of Technology,
31 Archbishop Kyprianos Street, Limassol, Cyprus
2
Department of Information Sciences, Neapolis University Pafos,
2 Danais Avenue, Paphos, Cyprus
Keywords:
Context-aware Recommender Systems, Location-based Systems, Entropy-based Hard k-modes Clustering,
Bayesian Inference,
iBeacon
Indoor Positioning System.
Abstract:
Supermarket customers find it difficult to choose from a large variety of products or be informed for the lat-
est offers that exist in a store based on the items that they need or wish to purchase. This paper presents a
framework for a Recommender System deployed in a supermarket setting with the aim of suggesting real-time
personalized offers to customers. As customers navigate in a store, iBeacons push personalized notifications
to their smart-devices informing them about offers that are likely to be of interest. The suggested approach
combines an Entropy-based algorithm, a Hard k-modes clustering and a Bayesian Inference approach to notify
customers about the best offers based on their shopping preferences. The proposed methodology improves the
customer’s overall shopping experience by suggesting personalized items with accuracy and efficiency. Simul-
taneously, the properties of the underlying techniques used by the proposed framework tackle the data sparsity,
the cold-start problem and other scalability issues that are often met in Recommender Systems. A prelimi-
nary setup in a local supermarket confirms the validity of the proposed methodology, in terms of accuracy,
outperforming the traditional Collaborative Filtering approaches of user-based and item-based.
1 INTRODUCTION
Recommender Systems (RS) are intelligent engines
that collect information related to what a user has pre-
viously seen or bought, with the aim of providing per-
sonalized suggestions on unobserved items that are
likely to be of interest. RS are often classified into
three broad categories: (a) Content-Based (CB) sys-
tems, which use keywords to suggest items to a user
similar to the ones preferred in the past (Konstan and
Riedl, 2012); (b) Collaborative Filtering (CF) tech-
niques, that recommend items based on the items a
user has previously seen or bought. Often such sys-
tems use various strategies based on e.g., user-based,
item-based, matrix factorization and clustering tech-
niques to find correlations between users/items (Ning
et al., 2015); (c) Hybrid Recommendation (HR) ap-
proaches, which use a combination of CB and CF
methods to solve some of the limitations that ex-
ist in the aforementioned systems (Adomavicius and
Tuzhilin, 2005). A brief description of these limita-
tions follows.
CB systems provide better accuracy results when
dealing with items containing textual information.
However, such systems lack the ability to distinguish
how well a text description is written from a badly
one, especially in the case of using similar or re-
lated terms (Adomavicius and Tuzhilin, 2005). Ad-
ditionally, such systems are often limited by the over-
specialization problem; when a system recommends
items with a high similarity compared to a user’s pro-
file, the user is likely to be suggested with items sim-
ilar to the ones that has already seen (L¨u et al., 2012).
Furthermore, when a new user registers into the sys-
tem and has few or no ratings at all, it is more likely
to get low accuracy recommendations (known as the
cold-start or new-user problem) (Adomavicius and
Tuzhilin, 2005). As discussed in (L¨u et al., 2012) CB
systems require a significant number of ratings before
suggesting items with high accuracy to a user.
In contrast to CB systems, CF approaches lead to
poor performances due to the sparsity problem (Ado-
mavicius and Tuzhilin, 2005). The number of items
that exist on e-commerce websites is enormous; as
a result, the most active users usually rate only a
subset of the entire dataset. This means that many of
Christodoulou, P., Christodoulou, K. and Andreou, A.
A Real-time Targeted Recommender System for Supermarkets.
DOI: 10.5220/0006309907030712
In Proceedings of the 19th International Conference on Enterprise Information Systems (ICEIS 2017) - Volume 2, pages 703-712
ISBN: 978-989-758-248-6
Copyright © 2017 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
703
the most popular items have few ratings and thus the
likelihood of the system suggesting them is relatively
low (Adomavicius and Tuzhilin, 2005) (Pu et al.,
2012). Similarly to CB systems, CF systems require
a significant amount of existing data on a user profile
before being able to make accurate suggestions. In
addition, new items need to be rated by a substantial
number of users; otherwise the RS would not be able
to come up with recommendations for them (Ning
et al., 2015). In general, RS are challenged with
scalability issues; taking into account the vast amount
of data that exists on websites and applications, a
considerable amount of computational power is
needed to compute recommendations (Pu et al.,
2012).
Summary of Contributions. This paper describes a
framework for using a Recommender System in a su-
permarket environment that aims to suggest real-time
personalized offers to customers using
iBeacons
.
The following questions motivated this study. RQ1
How does a Recommender System deals with data
sparsity, the cold-start problem and scalability issues
that may exist in a real-world application? RQ2
How accurate and personalized are the recommenda-
tions provided by the system and how do they affect
the store’s revenue? In seeking answers to the afore-
mentioned questions, this paper contributes the fol-
lowing: (a) the use of an Entropy-based algorithm and
a Hard k-modes clustering algorithm to overcome the
cold-start and data sparsity limitations; (b) the adop-
tion of a rule-based system to discover sub-datasets of
products, thus facing scalability issues; (c) the use of a
Bayesian Inference model, that is trained on dynamic
information provided by each user to predict whether
an item is likely to be recommended or not; (d) the
employment of a recommendation engine that sug-
gests the top-n personalized items to the users through
iBeacons
.
The remainder of this paper is structured as fol-
lows. Section 2 presents an overview of the proposed
methodology and discusses the technical background
of the described Recommender System. Section 3
demonstrates the results from our preliminary exper-
imentation. Section 4 reviews related work. Finally,
Section 5 describes future work and concludes the pa-
per.
2 OVERVIEW OF APPROACH
Modern supermarkets use loyalty schemes (e.g., loy-
alty cards) to reward repeated customers on pur-
chases. In this work, we suggest an interactive re-
warding scheme guided by a dynamic, real-time rec-
ommendation engine. More specifically, we propose
the replacement of loyalty cards with an interactive
smart-device application, which acts both as a bonus
card and as a recommendation engine. This section
presents an overview of the proposed methodology
(as depicted in Fig. 1).
2.1 Bootstrapping
A simple application allows users to register or link
their existing loyalty account to the system. A mobile
application guides the registration process where each
user is asked to develop its personal profile by pro-
viding information, such as: Full Name, Telephone
Number, Address, Phone Number, any Nutrition/Diet
Information, any Fasting or Vegetarian preferences,
any Allergies, Health status, Nationality and Religion.
An alternative option to registration is to link an ex-
isting loyalty card to the system. In this case, the cus-
tomer is asked to provide only the information that
is missing to build a personal profile. This process
is important since profiles are used during the recom-
mendation process.
From now on, we will refer to the information pro-
vided by each user as the user’s static information.
We should note here that static information is updated
automatically when users manually make changes on
their profiles. Apart from user’s static information the
system stores the user’s dynamic information; which
are the most recent transactions, historical transac-
tions, location of the most visited departments and
products to buy. We refer to such information as the
user’s dynamic information. Both static and dynamic
information comprise a user’s profile which is used
to guide a personalized recommendation process ac-
cording to his/her preferences.
2.2 Propagation of Recommendations
A novelty of our approach is that personalized recom-
mendations are propagated in real-time to each user
using
iBeacons
that reside within a certain range.
The notification process takes place while users navi-
gate into the store. In essence,
iBeacon
is a Bluetooth
low-energy, wireless technology developed by Ap-
ple
1
, which allows mobile applications (iOS or An-
droid) to listen for signals from
iBeacons
that are in
certain range. Broadly speaking,
iBeacons
consist of
two processes: (i) the device that broadcasts the data
(i.e.,
iBeacon
), and (ii) an application installed on a
smart device, which acts as the recipient (Yang et al.,
2015).
1
https://developer.apple.com/ibeacon/
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
704
Mobile
APP
Static
Information
Dynamic
Information
Model
B
Full Name
Full Address
Phone #
Fasting/Vegetarian
Allergies
Health
Transaction’s History
Location
Recommendations
Push Notifications
User 1
User 2
User 3
User X
Location/
Department
Religion
Offers List
To Buy List
Nationality
2 for the
price of 1
% offer
Price
Reducon
Product Dataset
Status
Figure 1: Overview of the Recommender System.
In a real-world setup
iBeacons
are distributed in
the different departments of a store. In this work
the
iBeacon
technology is used to push personalized
recommendations to customers based on information
(i.e., static and/or dynamic) from their profiles.
2.3 A Recommendation Model
In subsequent sections we describe in detail the al-
gorithms that compose the proposed recommendation
model. Firstly, we discuss how the static information
is utilized by the system.
User’s static information is used in a twofold pur-
pose: (i) to identify the number of clusters k that exist
in the dataset of registered users with the system, and
(ii) to group each user in a cluster based on users
preferences. In cases where a user’s profile is up-
dated/altered, then the cluster where the user belongs
is updated as well.
2.3.1 Determining the Number of Clusters
An Entropy-based approach is used as an external
cluster evaluation measure (Stylianou and Andreou,
2007). It groups data objects with similar char-
acteristics into clusters based on the entropy val-
ues of the objects using cosine similarity measure
(Christodoulou et al., 2014). For the purposes of
our framework the Entropy-based approach is used
to compute the number of clusters that exist within
the dataset of registered users (Christodoulou et al.,
2014). In doing so the algorithm determines the cen-
troids of each cluster utilizing users’ unique static in-
formation.
The entropy value H
ij
of two data objects X
i
and
X
j
is defined as follows:
H
ij
= E
ij
log
2
(E
ij
) (1 E
ij
)log
2
(1 E
ij
) for i 6= j (1)
where, E
ij
is the similarity measure between the
objects X
i
and X
j
that is computed using Equation 2.
E
ij
= e
aD
ij
(2)
D
ij
is the distance between the objects X
i
and X
j
and a is calculated by a =
ln(0.5)
¯
D
, where,
¯
D is the
mean distance among all data objects.
The total entropy value of X
i
with respect to all
other data objects is computed as:
H
i
=
n
j=1,i6=k
E
ij
log
2
(E
ij
) (1 E
ij
)log
2
(1 E
ij
)
(3)
In more detail the algorithm proceeds with apply-
ing the following steps:
(i) Select a threshold of similarity β and set the initial
number of clusters to k = 0.
(ii) Determine the total entropy values H for each data
object X.
A Real-time Targeted Recommender System for Supermarkets
705
(iii) Set k = k+ 1
(iv) Select the data object X
min
with the least entropy
H
min
and set Z
k
= X
min
as the k
th
cluster center.
(v) Remove X
min
and all data objects having similar-
ity β.
(vi) If X is empty then terminate, otherwise go to Step
3.
2.3.2 Hard k-modes Clustering
The Hard k-modes clustering algorithm (Stylianou
and Andreou, 2007) groups categorical data by re-
moving the numeric-only limitation (Huang and Ng,
1999) imposed by other clustering techniques (e.g., k-
means), using a matching dissimilarity measure. This
feature of the k-modes algorithm enables it to be used
efficiently for clustering large categorical datasets.
For the purposes of our framework and to deal with
potentially a large dataset of users we consider Hard
k-modes as a suitable clustering technique for group-
ing users in specific clusters in relation to the cen-
troids. Due the nature of the clustering algorithm,
each user belongs to a distinct cluster. The cen-
troids for each cluster are discovered by applying the
methodology as described in Section 2.3.1.
Given a pair of data objects X
1
, X
2
X defined by
m attributes, where X is the set of all data objects, the
dissimilarity between the pair of objects is defined as:
d(X
1
, X
2
) =
m
j=1
δ(x
1j
, x
2j
) where, (4)
δ(x
1j
, x
2j
) =
(
0, if x
1j
= x
2j
1, if x
1j
6= x
2j
In the case of Hard k-modes clustering, if an ob-
ject X
i
in a given iteration has the shortest distance
from a cluster center Z
i
, it is represented by setting
the value of the nearest cluster equal to 1 and the val-
ues of the other clusters to 0.
F(W, Z) =
k
l=1
n
i=1
w
a
li
d(Z
i
, X
i
) where, (5)
W = [w
li
] is a k by n real matrix, Z =
[Z
1
, ..., Z
k
] R
mk
, α is the fuzziness exponent, w
li
is
the weight degree of an object belonging to a cluster
and k is the number of clusters.
For hard clustering a = 1, the weight degree w
li
of
an object belonging to a cluster is given as follows:
w
li
=
(
1, if d(Z
i
, X
i
) d(Z
h
, X
i
), 1 i, l, h k
0, otherwise
The Hard k-modes algorithm proceeds by apply-
ing the following steps:
(i) Select k initial modes, one for each cluster.
(ii) Allocate data object to a cluster whose mode is
nearest to the selected one.
(iii) Compute the new modes for all clusters.
(iv) Repeat steps 2 and 3 until no data object has
changed.
2.3.3 Pre-processing using a Rule-based System
Personalization techniques are deployed for various
purposes in RS (Adomavicius and Tuzhilin, 2005).
For the proposed methodology a rule-based person-
alization technique is used for pre-processing and fil-
tering the overall dataset of products. This proce-
dure takes place after clustering each user in a cluster
containing users that share the same or similar char-
acteristics. A set of rules is then applied to create
sub-datasets of the overall dataset of products that are
more suitable for each cluster.
To reduce the time needed for computing the clus-
ters and hence the computation power necessary to
derive the recommendations, this procedure is per-
formed off-line.
The rules are associated with specific types of in-
formation inserted by the user, more specifically:
(i) Country (List of Countries) The system takes
into account the different demographic character-
istics and food habits of each country.
(ii) Nationality (List of Nationalities) Each nation-
ality has its own characteristics, habits and prefer-
ences. The system takes into account such partic-
ularities.
(iii) Religion (List of Religions) All religions have
their own unique characteristics that are also con-
sidered by the proposed system.
(iv) Fasting (Enable/Disable) – Some religions have a
fasting period, for example during Christmas and
Easter for Christians. If a user enables this option
the system determines any fasting habits, as well
as, the starting and ending date of each period.
(v) Vegetarian (Enable/Disable) When a user en-
ables this option the system is suggesting products
suitable for vegetarians only.
(vi) Diet (Enable/Disable) If a user enables this
option, the system immediately understands that
a user is likely to be on a diet or wishes to
start a new diet. The system also requires users
to specify the type of diet: Low-calories, Low-
carbohydrate, High-protein, Low-fat, etc. This in-
formation is taken into account during the recom-
mendation stage.
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
706
(vii) Allergies (Enable/Disable) If this option is en-
abled it means that a user is suffering from al-
lergies on specific products. The user must
choose the specific type of allergy is suffering
from a list that is presented. Each allergy type
is linked with products that must be avoided by
the user. (a) Food Allergies, (b) Latex Allergy
(c) Drug Allergy (d) Skin Allergy (e) Allergic
rhinitis (f) Other (g) None
(viii) Health status (Enable/Disable) If this option is
enabled the user is asked to providemore informa-
tion for a list of health indicators (a) Cholesterol
(b) High Blood Pressure (c) Sugar (d) Depression
(e) Other (f) None
The system considers a set of pre-defined rules
and initializes them based on a certain order or prior-
ity. For example, if a user belongs to a religion group
that forbids the consumption of beef then this is taken
into account. In addition, any change on the rules up-
dates the list of products of each cluster.
2.3.4 A Probabilistic Model
After clustering the users and finding the appropri-
ate sub-dataset of products for each cluster of users,
the system assesses the shopping preferences of each
user to determine whether a product is suitable for
purchase or not using a Bayesian Inference approach
(Christodoulou et al., 2015). A training procedure
takes place to estimate the likelihoods by taking into
consideration characteristics from the user’s transac-
tion history (e.g., frequently bought products of a
certain category and average price spent on products
from a certain category).
Given a pair of products from the same
category/sub-category, a Bayesian Inference ap-
proach similarly to (Christodoulou et al., 2015) is
utilized to characterize with a probability, whether a
product is suitable for purchase or not. To reason over
such a hypothesis the model takes into consideration
a set of evidence from the customer’s transaction his-
tory.
To formalize the probabilistic model, we denote
with H a Boolean hypothesis on whether a product
is suitable for purchase or not. Let E = e
1
, e
2
, . . . , e
n
denote a sequence of independent evidence inferred
from the transaction history. To reason over our hy-
pothesis, we model it as a conditional probability
P(H|E) and apply the formula,
P(H|E) =
P(E|H)P(H)
P(E)
. (6)
We assume that the prior probability P(H) is the
degree of belief in judging the hypothesis in the ab-
sence of any previous evidence, therefore, we assume
a uniform distribution similarly to (Christodoulou
et al., 2015). P(E) is the probability of the evidence
that is used as a normalization factor. We derive
this probability using the law of total probability
(Papoulis, 1991).
Training Data. To apply Equation 6 we need to es-
timate the likelihood of observing the evidence (de-
noted by P(E|H)), when the hypothesis is true or
false. To obtain suitable data to train our model the
system performs as follows:
Algorithm 1 returns a personalized Ranked List
(denoted by RK) of Products from each category. Our
aim is to recommend products of the same category
from the overall dataset of products that are on offer
(referred to as the
"
Offer-List
"
), according to the list
of ranked products from RK (a running example is
shown in Section 3).
Algorithm 1: Rank frequency bought products.
Require: User c, TransactionHistory th
for all product categories do
Rank each product using:
frequency(product) =
quantity
quantityO fcategory
. (7)
end for
return RK
Iteration 1: Evidence is Product Description. At
the first iteration the model considers, as a piece of
evidence, the string similarity computed by using the
cosine-similarity measure (Ning et al., 2015) between
a pair of products based on the products descriptions.
P(H|E
1
= simScore) =
P(E
1
= simScore|H)P(H)
P(E
1
= simScore)
. (8)
For the computation of the likelihoods a boot-
strapping procedure similar to (Christodoulou et al.,
2015) is followed to deriving probability distributions
from similarity scores.
Iteration 2: Evidence is the Average Price of a
Given Category. Once a posterior probability is com-
puted for some evidence e
1
E a new piece of ev-
idence e
2
E leads to compute the impact of e
2
by
considering the previously calculated posterior as the
new prior.
During this iteration we assume as evidence the
average price a customer spends on products from a
specific category. Assuming products from the same
category our model computes the degree of belief on
whether a product from the
"
Offers-List
"
is suitable
for purchase given its price. This is carried out by,
A Real-time Targeted Recommender System for Supermarkets
707
P(H|E
2
= avgPrice) =
P(E
2
= avgPrice|H)P(H|E
1
)
P(E
2
= avgPrice)
.
(9)
2.4 Recommendation Engine
Given a List of products on offer (denoted by OD),
the recommendation engine is configured to make
personalized recommendations based on the unique
shopping preferences of each user. The offers in the
OD are divided into various categories: 2 products for
the price of 1, products that are on sale, or products
that had a reduction in price.
Assuming the construction of sub-datasets for
each user belonging in a cluster (Sections 2.3.1 to
2.3.3) along with RK, the system applies the Bayesian
approach (Section 2.3.4) given a pair of products from
the RK with products from the OD dataset in order to
calculate the posterior probability.
When there are no any offers that suit the cus-
tomer’s unique shopping preferences the system rec-
ommends offers that are suitable for the whole group
of users (i.e, cluster).
2.5 Point-of-Sale (POS)
To complement the shopping experience of customers
in a supermarket,
iBeacons
that are installed close
to the POS systems push notifications to customers
regarding products that have not been purchased but
appear in the personalized
"
To-Buy-List
"
of each cus-
tomer.
After a successful payment, the recent transaction
history is uploaded on a server that is hosted over the
cloud. In addition, the system updates the users static
and dynamic information that is used for future pur-
poses. Finally, the system checks if a customer has
bought products from the recommendation list. In
such a case, it uses this information to derive statis-
tical evidence of any increase on store’s revenue as a
result of purchases made directly from the recommen-
dation list.
3 PRELIMINARY
EXPERIMENTATION
This section describes a preliminary experimental
case-study that has a twofold purpose: (i) to observe
an optimal value for the parameter β used to deter-
mine the number of clusters, and (ii) to get a confir-
mation of the validity of the techniques used.
3.1 Case-Study: Local Supermarket
For the purposes of our experimentation we deployed
our system in a local supermarket with 200 customers
(i.e., users).
By analysing data generated from the deployment
we constructed a set of datasets as follows: (a)
users-static dataset, defined as SU; that contains
the user static information, such as: Customer
ID, Full Name, Health Status, Allergies, Nutrition
characteristics etc.; (b) users-dynamic dataset, de-
fined as DU; that includes real-time information
such as transaction history, to-buy-list and loca-
tion; (c) products dataset, defined as DP; which
contains information regarding items; (d) offers
dataset, defined as OD; that includes special-offer
products; (e)
"
to-buy-list
"
products, defined as
TBD; that contains products that are essential to
buy.
We asked 200 users to provide us with their static
information that was not available from the super-
market’s proprietary system.
iBeacons
were installed in 2 different depart-
ments of the supermarket (i.e., Health care and
Grocery). The DP dataset contains products from
these departments where the missing features for
each product were filled in manually.
Finally, for evaluation purposes, we asked the
users to participate in a short survey where they
have been asked to rate their recommendations
(top-5 items).
The outcome of the above process resulted in the
following datasets: the SU dataset consists of 200
users with 8 features, the DU dataset consisting of
3000 users’ historical data monitored from 15 visits
for each user between January to June 2016 with 6
features, the DP dataset which contains 1000 prod-
ucts with 14 features, the OD dataset consisting of 45
products that are on offer with 5 features. Finally, the
TBD dataset contains 50 products from two depart-
ments with 2 features.
The experiments were carried out on a Pentium
(R) Dual-Core 2.70 GHz machine with 4GB of main
memory running Windows 7 (64 bit).
3.2 The Parameter β
To determine an appropriate set of clusters for the rec-
ommendation process the entropy threshold similarity
value β, needs to be tuned on the size of the dataset.
The higher the β value the lower the number of the
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
708
clusters discovered (Table 1). The execution time in-
creases proportionally as the number of clusters in-
creases.
Table 1: Impact of β on the SU dataset.
β
# clusters execution time (sec)
1 3 0.37
0.75
4 0.39
0.5
7 0.44
0.25
11 0.61
0.1
23 0.76
By observing the sensitivity of the β parameter
over a set of empirical trial-and-error experiments we
set β = 0.5 as the optimal value to obtain a number
of clusters in a relatively short execution time. The
outcome of the entropy-based and the hard k-modes
clustering was 7 clusters with users sharing similar
characteristics.
Having determined the set of clusters for the users,
a set of rules as described in Section 2.3.3 is applied
to create the sub-datasets of products suitable for each
cluster.
3.3 A Demonstration Example
Cluster c
1
has the following centroid < 1, 2, 1, 1, 0,
0, 0, 1 > where each element of the feature vector de-
scribes the category depicted in Table 2.
Table 2: Example of features described by the centroid vec-
tor.
No.
value description feature
1st 1 Cyprus Country
2nd
2 Greek Nationality
3rd
1 Christian Religion
4th
1 True Fasting
5th
0 False Vegetarian
6th
0 False Diet
7th
0 False Allergies
8th
1 Good Health Status
The feature vector of the centroid is used for ap-
plying the priority rules as described in Section 2.3.3.
The output of this filtering process is a sub-dataset of
products, p
j
PD, where j denotes the cluster num-
ber. Hence, p
1
PD is the sub-dataset of products for
cluster c
1
.
Following our demonstration and using
Algorithm 1
on the DU dataset we derived for
user
12
in cluster c
1
the products that the specific
customer buys more frequently. The system selects
the top frequently bought products for user user
12
on the Shampoos category, that exists in the Health
care department, to be compared with products of the
same category belonging in the OD dataset. This is
depicted in Table 3.
Table 3: Ranked frequency bought items.
user no.
cluster # cat.:Shampoos frequency
score
user
12
c
1
Product1 0.36
Product232 0.27
Product31 0.20
Product4 0.17
Using the Bayesian Inference approach the
system calculates the posterior probability to guide
the recommendation process as:
Iteration 1. Let us assume that the likelihood P(E
1
=
simScore|H) is given by a probability density func-
tion as an integral over a finite region [a, b], P(a
X b) =
b
R
a
f(x) dx
Following our experiment, with user
12
, the sys-
tem computes the posterior degree of belief between
the similarity score, derived using cosine-similarity
measure (Ning et al., 2015), returned by comparing
the text descriptions of Product 1 from the
Shampoo
category with Products OD. We also assume
that P(H) is a uniform prior using the principle of
indifference.
Iteration 2. Let us assume that the likelihood P(E
2
=
avgPrice|H) is givenby a probability density function
as an integral over a finite region [a, b], P(a X
b) =
b
R
a
f(x) dx
The previously calculated posterior, for user
12
, is
updated using a new evidence i.e., the average price
that user
12
spends on products from the
Shampoo
category. In this iteration, the system computes a
new posterior degree of belief given the average price
spent on products with products that belong to OD.
Note that in order for a product to be recom-
mended it must exist in the dataset of the cluster to
which a user belongs to. Following our example with
user
12
if a product does not exist in p
1
it cannot be
recommended.
Recommendations. Finally, the proposed system
recommends to user
12
a list of products that are on
offer similar to Product 1 (shown in Table 4).
Table 4: Recommended products for user
12
.
product id
probability of purchase
Product 321 0.76
Product 88
0.65
Product 454
0.59
Product 125
0.46
Product 779
0.39
A Real-time Targeted Recommender System for Supermarkets
709
The procedure returns a personalized list of top-5
items that are on offer, as suggested by the methodol-
ogy described in Section 2. The recommendations list
is broadcast to user
12
using
iBeacons
that are located
in the Health care department.
3.4 Measuring Accuracy
To measure how well the proposed methodology rec-
ommends products that are on offer we measure pre-
cision as follows:
From the set of 200 users that visited the store 15
times, the system suggests the top-5 products that
each user is likely to purchase from the offers list.
At checkout the system monitors which of the rec-
ommended products were actually purchased.
Along with the above data, users were asked to
provide us with explicit feedback by annotating
(Suitable/Not Suitable) which of the suggested
top-5 products might be of an interest to them (as
shown in Table 5).
Table 5: Obtaining feedback from user
12
.
product id
probability purchased suitable?
of purchase at POS?
Product 321 0.76 N/A
Product 88
0.65
Product 454
0.59
Product 125
0.46
Product 779
0.39
The feedback phase seeks to obtain additional in-
formation from users that guides our evaluation. The
feedback is collected in the form of true positive;
product recommended and purchased or suitable for
purchase and false positive; product recommended
but not purchased and not suitable. From these an-
notations, the precision =
tp
tp+ f p
, for user
12
during
a single visit is 0.60.
To monitor the behavior of the system we repeated
the experiment for the entire set of 200 users that par-
ticipated in our feedback experiment. Fig. 2 shows
a frequency plot with the precision (y-axis) obtained
for each user grouped into bins. The average preci-
sion for this case is 0.7190.
Similarly, to study how the number of recom-
mended items affects the system’s precision we re-
peated the experiment for top-3 items (as shown in
Fig. 3). The average precision for this case is 0.8028.
3.5 Comparison with Benchmark CF
Algorithms
To compare the accuracy of the proposed methodol-
ogy with common CF approaches (item-based, user-
based) we additionally asked customers to evaluate
the lists of recommended products resulting from both
item-based and user-based methods. Table 6 shows
the precision between the proposed approach com-
pared with the average precision computed from the
aforementioned CF approaches. We observed that
our system performs better than the typical CF ap-
proaches at various cases of recommended products,
with an average improvement of 24.7%.
Table 6: Precision comparison with the benchmark CF al-
gorithm.
Proposed
methodology
Average
benchmark-CF
top-3 0.8028 0.6243
top-5 0.7190 0.5951
4 RELATED WORK
Lawrence et al., (2001) contributes a personalized
Recommender System that suggests new products to
supermarket buyers based on association rules. As-
sociation rules are applied to define the relationships
among the products. A clustering technique is then
utilized to cluster shoppers with similar spending his-
tories. An increase in the supermarket’s revenue is
observed when shoppers choose to purchase products
from the recommendation list.
Modeling temporal dynamicsis another parameter
that influences present RS due to the fact that users
tend to change their preferences over time. Users’
behavior can be defined by short-term and long-term
preferences (Xiang et al., 2010). According to (Ko-
ren, 2009), product attention and popularity are reg-
ularly changing making customers reconsider their
tastes, interests and feelings. Time changing behav-
ior on the data is therefore an important factor to be
taken into consideration when designing a RS.
Authors in (Christodoulou et al., 2014) present a
model that utilizes an Entropy-based algorithm and
variations of k-modes clustering techniques. The aim
is to cluster objects according to certain data features
and then use these features to make recommendations
to users. The system records the users’ behavior that
is changing dynamically over time to support the rec-
ommendation process. Experimental results show an
increase in recommendation accuracy
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
710
0.4 0.5 0.6 0.7 0.8 0.9 1
0
10
20
30
40
50
60
70
Precision
Frequency
Figure 2: Users’ precision for the top-5 case.
0.65 0.7 0.75 0.8 0.85 0.9 0.95 1
0
20
40
60
80
100
120
Precision
Frequency
Figure 3: Users’ precision for the top-3 case.
and performance compared to the state-of-the-art al-
gorithms when applied to the same context.
Suksom et al. (Suksom et al., 2010) proposed a
personalised food RS based on a rule-based approach.
The system aims to offer personalized recommenda-
tions on different kinds of meals to users based on
their nutrition requirements or other health care char-
acteristics.
The work in (Nikoletic, 2013) implements a RS in
physical stores targeting to make shopping more inter-
active to buyers. The proposed methodology utilizes
user-based and item-based CF methods, and a Re-
stricted Boltzmann machine algorithm. The system
computes recommendations based on the customers’
purchase patterns and uses iBeacons to locate a mo-
bile device in a real-world implementation to push
recommendations.
Lacic et al. (Lacic et al., 2015) present a RS based
on CF that makes use of a user’s location captured by
indoor position systems. The RS relies on user-based
CF to suggest items with no data available. The
authors argue that the proposed method outperforms
Matrix Factorization approaches when dealing with
cold-start users.
Discussion. The framework described in this paper
makes use of an Entropy-based approach to determine
the number of clusters and a Hard K-modes Clus-
tering algorithm to group together users with similar
characteristics. We propose this technique as a so-
lution to the data Sparsity limitation, the cold-start
problem and scalability issues often met in RS. Ad-
ditionally, the proposed system uses a dataset which
contains not only the traditional 2D Users x Items
space, but also multiple other criteria such as: coun-
tries, nationalities, religions, fasting periods, vegetar-
ian habits, diets, allergies and health statuses.
To reduce the search space in the set of overall
products, used during the recommendation process, a
rule-based system is applied over the products dataset
with the aim of creating personalized sub-datasets of
products for each cluster of users. Our probabilistic
model utilizes users transaction history to learn fre-
quent shopping habits of each user. This is then used
as input to a Bayesian Inference approach to reason
over a hypothesis given certain pieces of evidence.
Overall our work presents a recommendation engine
that makes personalized suggestions on products that
are on offer to users, in real-time, using the
iBeacon
protocol.
5 CONCLUSIONS AND FUTURE
WORK
In a supermarket setting, where users are constantly
changing their preferences or shopping habits, and
products potentially change their characteristics or
lose their popularity, there is a need for a system
that captures the dynamic environment of a supermar-
ket aiming to recommend products that are on offer.
Throughout this paper we discussed how the cold-
start problem, the data sparsity and other scalability
issues often met in RSs are minimized by utilizing
an Entropy-based Hard k-modes clustering methodol-
ogy. Using a Bayesian inference approach we showed
how the system can suggest personalized recommen-
dations to users considering different pieces of evi-
dence.
To explore whether our methodology meets our
expectations we deployed
iBeacons
in 2 departments
of a supermarket where customers installed the proto-
type mobile application on their smart devices. Feed-
back was obtained on the recommendations made for
each customer and used for evaluating the systems
accuracy. Our findings showed an average precision
A Real-time Targeted Recommender System for Supermarkets
711
of 0.7190 for the top-5 case and 0.8028 for the top-3
case outperforming traditional CF approaches (item-
based and user-based).
Although our preliminary experimentation sug-
gested the validity of our methodology, additional ex-
perimentation needs to be undertaken to validate the
accuracy and performance of the proposed system in
supermarkets of a larger scale; in terms of products
and customers. In addition, the parameter n that con-
trols the number of recommended products needs to
be automatically tuned to further increase the sys-
tem’s accuracy. Furthermore, an investigation needs
to be undertaken on how the number of products in-
fluences the number of clusters discovered.
Finally, experiments will be carried out to study
how efficient the system propagates notifications
through
iBeacons
and how does group recommen-
dations affect buyers into purchasing products.
REFERENCES
Adomavicius, G. and Tuzhilin, A. (2005). Toward the next
generation of recommender systems: A survey of the
state-of-the-art and possible extensions. IEEE Trans.
Knowl. Data Eng., 17(6):734–749.
Christodoulou, K., Fernandes, A. A. A., and Paton, N. W.
(2015). Combining syntactic and semantic evidence
for improving matching over linked data sources. In
Web Information Systems Engineering - WISE 2015
- 16th International Conference, Miami, FL, USA,
November 1-3, 2015, Proceedings, Part I, pages 200–
215.
Christodoulou, P., Lestas, M., and Andreou, A. S. (2014).
Applying hard and fuzzy k-modes clustering for dy-
namic web recommendations. International Journal
on Engineering Intelligent Systems, 22(3-4).
Huang, Z. and Ng, M. K. (1999). A fuzzy k-modes al-
gorithm for clustering categorical data. IEEE Trans.
Fuzzy Systems, 7(4):446–452.
Konstan, J. A. and Riedl, J. (2012). Recommender systems:
from algorithms to user experience. User Model.
User-Adapt. Interact., 22(1-2):101–123.
Koren, Y. (2009). Collaborative filtering with temporal dy-
namics. In Proceedings of the 15th ACM SIGKDD In-
ternational Conference on Knowledge Discovery and
Data Mining, Paris, France, June 28 - July 1, 2009,
pages 447–456.
Lacic, E., Kowald, D., Traub, M., Luzhnica, G., Simon, J.,
and Lex, E. (2015). Tackling cold-start users in rec-
ommender systems with indoor positioning systems.
In Poster Proceedings of the 9th ACM Conference on
Recommender Systems, RecSys 2015, Vienna, Austria,
September 16, 2015.
L¨u, L., Medo, M., Yeung, C. H., Zhang, Y.-C., Zhang,
Z.-K., and Zhou, T. (2012). Recommender systems.
Physics Reports, 519(1):1–49.
Nikoletic, M. (2013). Recommender systems-a
smarter shopping solution. Bachelor’s thesis.
http://milnik.net/.
Ning, X., Desrosiers, C., and Karypis, G. (2015). A com-
prehensive survey of neighborhood-based recommen-
dation methods. In Recommender Systems Handbook,
pages 37–76.
Papoulis, A. (1991). Probability, Random Variables and
Stochastic Processes. McGraw-Hill Companies, 3rd
edition.
Pu, P., Chen, L., and Hu, R. (2012). Evaluating recom-
mender systems from the user’s perspective: survey
of the state of the art. User Model. User-Adapt. Inter-
act., 22(4-5):317–355.
Stylianou, C. and Andreou, A. S. (2007). A hybrid soft-
ware component clustering and retrieval scheme using
an entropy-based fuzzy k-modes algorithm. In 19th
IEEE International Conference on Tools with Artifi-
cial Intelligence (ICTAI 2007), October 29-31, 2007,
Patras, Greece, Volume 1, pages 202–209.
Suksom, N., Buranarach, M., Thein, Y. M., Supnithi, T., and
Netisopakul, P. (2010). A knowledge-based frame-
work for development of personalized food recom-
mender system. In Proc. of the 5th Int. Conf. on
Knowledge, Information and Creativity Support Sys-
tems.
Xiang, L., Yuan, Q., Zhao, S., Chen, L., Zhang, X., Yang,
Q., and Sun, J. (2010). Temporal recommendation on
graphs via long- and short-term preference fusion. In
Proceedings of the 16th ACM SIGKDD International
Conference on Knowledge Discovery and Data Min-
ing, Washington, DC, USA, July 25-28, 2010, pages
723–732.
Yang, J., Wang, Z., and Zhang, X. (2015). An ibeacon-
based indoor positioning systems for hospitals. Inter-
national Journal of Smart Home, 9(7):161–168.
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
712