Mobile Gift Recommendation Algorithm
Ca
´
ıque de Paula Pereira, Ruyther Parente da Costa and Edna Dias Canedo
Faculdade UnB Gama, Universidade de Bras
´
ılia, Gama, DF, Brazil
Keywords:
Recommendation Algorithms, e-Commerce, Mobile Software Development, iOS, Giftr.
Abstract:
The mobile application market and e-commerce sales have grown steadily, along with the growth of studies and
product recommendation solutions implemented in e-commerce systems. In this context, this paper proposes
a recommendation algorithm for mobile devices based on the COREL framework. The proposed recommen-
dation algorithm is a customization of the COREL framework, based on the complexity of the implementation
associated with iOS mobile applications. Therefore, this work aims to customize a gift recommendation algo-
rithm in the context of mobile devices using as main input the user preferences for the gifts recommendation
in the Giftr application.
1 INTRODUCTION
The e-commerce in recent years has seen an in-
tense growth in sales in Brazil, festive dates of the
year like Mother’s Day, Valentine’s Day, Children’s
Day, Christmas Day, etc. are the time of year in
which the demand for this type of trade intensifies e-
commerce(Mendes, 2016). This scenario provides a
business opportunity for software applications that of-
fer the consumer the opportunity to gift someone on
those festive dates by cross-referencing user profile
data to offer the best related gifts.
To improve the user experience and increase their
sales, online companies use product recommendation
algorithms according to the characteristics of their
consumers. There are several types of algorithms, and
despite the success of some of them, most of them
have problems. Therefore, it is important that compa-
nies have a consistent and relevant algorithm to rec-
ommend products to their (Gama et al., 2011).
One of the problems encountered in creating rec-
ommendation algorithms is that, initially, the system
has not much user information. That hinders the
learning and performance of the algorithms. Thus, it
is necessary to use mechanisms that reduce the learn-
ing time of the algorithms and predict based on the
little available information(Gama et al., 2011).
The e-commerce began in the 90s, when the first
sales websites were created. Initially, the volume
of transactions was very low. But the change in
the world market made it become the largest and
most voluminous way to market products (do Nasci-
mento et al., 2009). According to a survey released
by Buscap
´
e in 2015, billions of brazilian reais are
collected on commemorative dates for e-commerce
sales. The revenue for Christmas in 2015 was 7.40
billion brazilian reais through purchases made on the
internet(de Souza, 2013).
Several studies are being done in the area of e-
commerce, especially about algorithms of recommen-
dations, widely used in web systems. The article
Predicting Customer Purchase Behavior in the E-
Commerce Context is an example of a study that pro-
poses an improvement of recommendation systems
using techniques that aim to predict the behavior of
the user, later to use it as input for the recommenda-
tion of Products itself (Qiu et al., 2015).
The Giftr application is an example of an initiative
in this context. This application was designed and
developed by Ruyther Costa, Ca
´
ıque Pereira, Caio
Sanchez and Victor Bruno, during the BEPiD project
in the period of February 2 and December 11, 2015.
This research seeks to recommend gifts that best
suit the user, based on information of his profile and
personal preferences that he has registered in the ap-
plication Giftr.
One of the problems found in e-commerce stores
and sales applications is the creation of good prod-
ucts by means of recommendation algorithms for their
users. These algorithms help both the user experience
and the increased sales of the companies.
Due to this difficulty, this work proposes the fol-
lowing question:
Q1. How to create a gift recommendation algo-
Pereira, C., Costa, R. and Canedo, E.
Mobile Gift Recommendation Algorithm.
DOI: 10.5220/0006330405650573
In Proceedings of the 19th International Conference on Enterprise Information Systems (ICEIS 2017) - Volume 1, pages 565-573
ISBN: 978-989-758-247-9
Copyright © 2017 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
565
rithm that fits the demand of a mobile app?
Answering this question, this work may contribute
to the improvement of other recommendation algo-
rithms. The data collected here can be used for future
work related to the algorithms of recommendations
focused on the e-commerce for gifts. The general ob-
jective of this work is to develop a gift suggestion
algorithm that recommends the best products to the
user, based on their profile.
The secondary objectives of this work are: Investi-
gate possible gift recommendation solutions that take
into account the user profile;Substantiate the adopted
solution with other algorithms solutions.
2 THEORETICAL BASIS
The recommendation systems are intended to assist in
the suggestion of items, products, services and con-
tents, partially or fully automatically, according to the
user’s interests and needs (Burke, 2002). These sys-
tems can provide information that helps the user in
the decision making of which items to choose, which
can be, for example, books, music, movies, products,
as well as recommendation systems can, based on a
user’s profile, suggest Items to the user directly with-
out the intermediation of the same, such as gifts that
the user may have interest based on his profile.
According to Resnick, a recommendation system
has as input data that the user giver, the system then
uses them to make the recommendations and then
directs them to the relevant recipients (Resnick and
Varian, 1997). The term ”recommendation systems”
came to replace the term ”collaborative filtering”, af-
ter which collaborative filtering refers to a specific
recommendation algorithm. In general, recommenda-
tion systems are referred to systems that recommend
a list of user products or systems that help users eval-
uate products.
The systems of recommendations are classi-
fied based on how the recommendations are made.
Among the main systems of recommendations cited
are Brke (Burke, 2002), Balabanovic and Shoham
(Balabanovi and Shoham, 1997) and finally Ado-
mavicius and Tuzhilin (Adomavicius and Tuzhilin,
2005). These systems will be presented in the fol-
lowing subsections.
2.1 Content-based Recommendation
Also known as content-based filtering, this technique
consists of recommending similar items to the user to
those that the user chose in the past, that is, according
to the history of items that he has rated as favorite or
acquired in the past.
According to (Burke, 2002), each item in a set I is
defined by characteristics associated with it, a prod-
uct, for example, may have characteristics such as:
name, price, category, etc. Based on these charac-
teristics that the items can be compared and the sim-
ilarity between them, this characterization serves as
input to this recommendation system, since the items
recommended to the user that may be of his interest
are those similar to what he used on the past and are
recorded on his history.
Content-based recommendation systems originate
from information retrieval techniques and the re-
search done by (Burke, 2002), (Balabanovi and
Shoham, 1997) and (Adomavicius and Tuzhilin,
2005) on information filtering searches.
2.2 Collaborative Recommendation
The Collaborative Recommendation is the one which
the user will be recommended items that people
with similar tastes and preferences liked in the past.
In other words, it tries to predict the relevance
of items for a particular user based on the items
previously rated by other users.(Adomavicius and
Tuzhilin, 2005)
2.3 Hybrid Approach
This method proposes to combine two or more types
of data recommendation techniques. The main objec-
tive of the use of this method is what concerns some
limitation that may exist in the individual use of other
types of techniques.
As an example, the main approach that can occur
with the combination of content-based recommenda-
tion systems and the collaborative recommendation,
based on the analysis made by (Adomavicius and
Tuzhilin, 2005), are:
1. Implement the Collaborative and Content-
based Methods Separately and Combine Their
Predictions. This way you can combine the final-
ized recommendations of the two techniques and
offer the user a final recommendation. Another
possibility is the system check which of the two
techniques offered the user the best recommenda-
tions and then, select and present one of the two;
2. Integrating Some Content-based Features into
a Collaborative Approach. The system main-
tains content-based user profiles, and can compare
users to determine which ones are the most simi-
lar, and finally use collaborative filtering. Thus, in
addition to having the recommendations based on
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
566
items that were well evaluated by the user, items
that were also well evaluated by other users with
similar profile would be another input for the final
recommendation;
3. Incorporating Some Collaborative Features
into a Content-based Approach. The most com-
mon approach in this approach is the use of a di-
mensionality reduction technique for the collab-
orative creation of a group of content-based pro-
files;
4. Construct a Unified Model That Incorporates
Features of Content-based and Collaborative
Approaches. This approach is extensively stud-
ied and aims to make recommendations more ac-
curate.
2.4 e-Commerce Recommendation
Systems
This algorithm suggests future consumer products ag-
gregating transactions of similar consumers. The al-
gorithm computes similarity using a vector-line func-
tion. A greater similarity indicates that consumers
may have similar preferences, since they have pur-
chased similar products.
The item-based algorithm is similar to the User-
based algorithm, it only changes that the similarities
of the products are computed rather than the similari-
ties of the consumers. This algorithm has been shown
to be highly efficient and of better quality than the
user-based algorithm. This algorithm computes the
similarities by means of a matrix that calculates the
potential products to be purchased for each consumer.
The algorithm based on dimensionality reduction
condenses the original interaction of the matrix and
generates recommendations based on the condensed
and less dispersed matrix to alleviate the dispersivity
problem. Recommendations are generated in a simi-
lar way to the user-based algorithm.
2.5 Related Work
Several studies in the field of e-commerce recommen-
dation algorithms have been developed, and this in
particular proposes a framework that aims to predict
user behavior in the context of e-commerce (Qiu et al.,
2015). The great differential presented in this article
is that it aims to predict consumer behavior, in other
words, the consumer’s preferences to buy some prod-
uct in an ecommerce system. The article points out
that through traditional algorithms there is no satis-
factory execution of predictive tasks, so the article
proposes a framework, COREL, a solution capable of
solving this very common challenge in the traditional
business context.
The framework proposed in this study, called
COREL, is divided into two stages. The first stage
is to make an association between products by rais-
ing what is common among them and from these data
to predict the motivations that lead the consumer to
buy a particular product, and then build a list of prod-
ucts candidates for purchase by this consumer. The
second stage is to predict the main characteristics that
the consumer will be interested in a particular type of
product and through these data define the products in
which the consumer will be interested, based on the
list of candidate products generated at the end of the
first stage.
COREL uses probability calculations to investi-
gate the decision-making process the consumer is
conducting on an e-commerce website. At first, the
probability of the product d
i
to be acquired, P(d
i
) is
calculated, as is P(d
j
|d
i
) indicating the conditional
probability of the consumer buying the product d
j
given the purchase of d
i
. Another computation used
is P(d
i
|c
k
), which indicates the probability of the con-
sumer c
k
to buy product d
i
. In addition, the formula
1 indicates the probability, after a time t of c
k
buying
d
i
, and also buy d
j
later:
P(d
j
|c
k
, d
i
) =
P(d
i
|c
k
, d
j
)P(d
j
, c
k
)
P(d
i
, c
k
)
(1)
If the event of purchase of the product by the con-
sumer is arbitrary, with no relation to the purchase of
d
i
, the calculation of the probability of the equation 1
changes:
P(d
j
|c
k
, d
i
) =
P(d
j
|d
i
)P(d
j
|c
k
)
P(d
j
)
(2)
The calculation of P(d
j
|c
k
, d
i
) occurs for each
product d
j
εw, since w is the collection of candidate
products [w = (d
1
, ..., d
i1
, d
i+1
, ..., d
m
)]. Therefore,
the calculation of a predictive framework can be spec-
ified as:
P(d
j
|c
k
, d
i
) α P(d
j
|d
i
)P(d
j
|c
k
) (3)
The parameter P(d
j
|c
k
) may also indicate the
preference that c
k
has for d
j
. Each product con-
tains several features, such as color and price, and
the user may have a preference for some of these fea-
tures. Thus, the author of the paper proposes a way to
predict which feature c
k
prefers in certain d
j
, taking
into account the assumption that each user has his or
her own preferences for the characteristics of a prod-
uct, regardless of another user of the system. Thus,
P(d
j
|c
k
) is obtained as follows:
Mobile Gift Recommendation Algorithm
567
P(d
j
|c
k
) = P( f
j1
, ..., f
jn
|c
k
) =
n
l=1
P( f
jl
|c
k
) (4)
Then according to the article, the preferences of
c
k
for certain characteristics of some product are de-
terminant for the calculation of the probability of the
consumer to buy product d
j
. In this way, the proposed
framework, COREL, takes the following formula:
P(d
j
|c
k
) =
1
Z
P(d
j
|d
i
)
n
l=1
P( f
jl
|c
k
) (5)
Figure 1: Process workflow of COREL (Qiu et al., 2015).
The Figure 1 shows the flow of the COREL frame-
work methodology, which is divided into the follow-
ing steps: identifying the product d
i
purchased by the
consumer c
k
, calculate the probability (P(d
j
, d
i
)) of
the consumer to purchase d
i
after the purchase of d
j
and list candidate products for consumer purchase.
The subsequent steps are iterative (
n
i=1
P( f
i
, c
k
)) and
aims to list products (w) that consumer c
k
may be of
interested, based on the f
i
characteristics of a par-
ticular product that it prefers, they are: (1) calcu-
late the popularity of a product based on its charac-
teristics(Heat Model), (2) calculating the probability
DC(c
k
, d
j
) of the consumer c
k
buying d
j
based on his
preferences and finally (3) estimating the grade which
would be given by the consumer to a product based on
the rating given to a product by a consumer with prod-
uct preferences similar to his. After the initial steps
and iterations of the framework, the products recom-
mended to the consumer are listed.
In a more detailed way, the first step is to iden-
tify the products purchased by the consumer in the
e-commerce system, after all this data will be an im-
portant input for the subsequent steps that will try to
predict, for example, what the characteristics are (Ex-
amples: price , color, brand, and others) of the product
that the consumer believes is decisive when purchas-
ing a product.
P(d
j
, d
i
) =
|d
i
d
j
|
d
i
(6)
P(d
j
, d
i
) =
|T hr(d
i
) T hr(d
j
|)
T hr(d
i
)
(7)
The second step is defined by calculating the equa-
tion 7, based on the likelihood model (Ponte and
Croft, 1998), equation 6, which represents an asso-
ciation in which the products d
i
and d
j
, that is, given
the purchase of the product d
i
would be calculated the
probability of the consumer to get product d
j
, d
i
in
the equation 6 is the number of products d
i
acquired
and |d
i
d
j
| the frequency that the products d
i
e d
j
occur based on the same e-commerce system. How-
ever, the author’s proposal to construct an association
between categories with the objective of obtaining a
relation with the selected candidate products coming
from several categories with a particular product, for
that reason, the author introduces the equation 6, be-
ing T hr(d
i
) representing the third-level product cat-
egories d
i
. In the third step, the identification of the
candidate products is carried out, based on the execu-
tion of the previous steps.
The steps that integrate CORELs second stage,
consumer preferences, already identified, are used to
identify which candidate products are most likely to
be purchased. For further refinement of the selected
candidate products, the author investigates three prod-
uct categories, they are:
1. Heat Model: It is intended to predict the charac-
teristics that the consumer may be interested in by
calculating the popularity of these characteristics,
based on the SVR model, using some characteris-
tics as basis for the model, they are: Qr, Qs, Qa
and Qu;
2. A hierarchical Bayesian discrete choice model:
The author proposes to develop a discrete choice
Bayesian hierarchical model to calculate the prob-
ability of c
k
choosing product d
j
based on its
brand preference and price sensitivity;
3. Collaborative filtering: The model aims to pre-
dict the evaluation that the consumer would give
to some product, based on the other consumers of
the system that has similar tastes to his.
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
568
3 RESEARCH PROTOCOL
The objective of this systematic mapping is to identify
articles related to recommendation algorithms based
on the user profile that can be found in the literature
and answer the research questions raised in the appli-
cation of this technique.
3.1 Research Questions
The systematic review will seek to answer the follow-
ing research questions:
(Q.1) What is Recommendation Algorithm?
(Q.2) What are the recommendation algorithms in
the literature?
(Q.3) What are the recommendation algorithms
most used in the literature to select a desired item?
(Q.4) Can existing algorithms be used or should
customize and create a selection algorithm?
3.2 Search String
To answer the research questions, the definition of the
string is a necessary step to carry out the research in
some digital scientific bases. The string construction
is based on the guidelines defined by (Keele, 2007),
which consists of identifying keywords from search
queries and uses AND connectors to combine key-
words and ORs to match synonyms.
The search string created for the research was:
(algorithm OR algoritmo) AND (recommendation
based on profile OR recomendac¸
˜
ao baseado no per-
fil OR recommendation OR recomendac¸
˜
ao) AND (e-
commerce)
3.3 Results
According to the Systematic Review process, the re-
search questions were answered.
Q.1 What is Recommendation Algorithm?
Recommendation systems are widely used in many
applications to suggest services and information to
potential consumers. Services like Amazon.com,
Netflix.com, Half.com have used referral systems and
increased the loyalty of their consumers. Good rec-
ommendation algorithms are needed for the operation
of these recommendation systems (Zan Huang, 2004).
Q.2 What are the recommendation algorithms in
the literature?
The recommendation algorithms that were found
are content-based, collaborative recommendation, hy-
brid approach, user-based algorithm, item-based algo-
rithm, and dimensionality reduction algorithm.
Q.3 What are the recommendation algorithms
most used in the literature to select a desired item?
Algorithms based on user behavior.
Q.4 Can existing algorithms be used or should cus-
tomize and create a selection algorithm?
The existing algorithms are not enough to fit the con-
text of this work. However, some can be availed.
Therefore, it is necessary to customize the recommen-
dation algorithm for the desired context.
4 DEVELOPMENT
The Giftr application was created in the BEPiD
(de Braslia, 2016) project with the idea of helping
people give gifts to each other. The solution found
by the team was to develop a social network where
each user registers their favorite products, tastes and
sizes (shoes, t-shirts, etc), and with this data the user
has the possibility to give another through the appli-
cation.
The functionality of the search application, both
user and product has a fundamental role in the ap-
plication, because through them users can find other
users and thus invite them to be your friends. Already
the search for products allows the user to find prod-
ucts in general, based on the products available from
the API of the Lomadee (Lomadee, 2016b), enabling
the user to make the purchase of products and evalu-
ate the products, with a variation of zero to five points,
to show in the system how much the user wants to be
presented with that product.
The data control functionality of the profile allows
the user to change and add personal information of
the user, this being the means that the same has to
register their tastes, fundamental for the operation of
the algorithm of recommendation, and the measures,
the size of footwear used by him. The registration
of the tastes occurs through the entry by the user of
a string that represents a taste of yours, for example,
”iPhone”, and later inform which category of the Bus-
cap
´
e is associated with preference, for example ”cel-
lular and smartphone”.
4.1 Lomadee Platform
Buscap
´
e (Company, 2016) offers some very ro-
bust platforms, among which is Lomadee (Lomadee,
2016c), which provides several APIs for data access
available in the Buscap
´
e system. Lomadee offers sev-
eral APIs (Lomadee, 2016a), they are:
Offers API: it allows to retrieve data of cate-
gories, products, offers and evaluations of users
and stores of Buscap
´
e;
Mobile Gift Recommendation Algorithm
569
Coupon API: enables you to query for active
coupons on the Lomadee platform;
Reporting API: Enables the retrieval of transac-
tion or commission data in detail.
The API used in the Giftr application is that of the
Offers on the Lomadee platform, because through it
there is the possibility to retrieve data from categories,
products, offers and evaluations of Buscap
´
e users and
stores, which are fundamental to the Giftr application
and to the recommendation algorithm of gifts. This
API provides several types of query for data recovery
and among them the ones that are used are:
Find Category List: returns detailed information
of existing product categories in Buscap
´
e and Lo-
madee;
Top Products: returns the best products from Bus-
cap
´
e and Lomadee, processed and filtered by a ex-
clusive technology of the platform;
Find Products List: lists with detailed product in-
formation on Buscap
´
e and Lomadee;
View User Ratings: returns general user rating
data about a specific product;
Top Offers: returns the most searched products in
Buscap
´
e/Lomadee;
Find Offer List: returns a list of the sites that are
offering the product.
In addition to the outputs that each type of query
returns, it is necessary to have a well-structured input
so that the results are correct, the complete descrip-
tion of the inputs and outputs of each query available
on the website of the Lomadee platform (Lomadee,
2016b).
4.2 Gift Recommendation Algorithm on
Mobile Devices
The algorithm proposed in this article will be based in
another article, the Predicting Customer Purchase Be-
havior in the e-Commerce Context (Qiu et al., 2015),
which will be customized to be accordance with mo-
bile applications.
The framework COREL was proposed for a e-
commerce context, which aims predict the costumer
behavior and recommend products based on that pre-
diction. The context proposed for this algorithm is a
mobile application that it helps people give a present
to the other, recommending products based on the
user profile.
The figure 2 shows the flow from the proposed al-
gorithm with a hybrid approach (Section 2.3), little
similar to the one that COREL uses, and the subsec-
tions below detail each step.
Figure 2: Proposed Algorithm with a hybrid approach.
4.2.1 Categorize the Products Rated by the User
In the first step from COREL, the ”product currently
purchase by costumer c
k
, d
i
”, which consists of veri-
fying the product d
i
bought by the purchased by the
consumer c
k
, given to the framework a base product
that will allow the probability calculations to be per-
formed later. This context, however, differs a lot of
the one that the proposed algorithm is, because the
main goal is to recommend gifts based on the user
profile through a mobile application, the Giftr.
Having this in mind, the proposed algorithm, in-
stead verify the product (d
i
) that the consumer (c
k
)
purchased, identify the product (p
i
) that the user rated
in the mobile application, with a range from zero to
five. The product rated (p
i
) is wrote in a user‘s pur-
chased products list (l
p
) for further use in the algo-
rithm.
The Lomadee API returns many product‘s at-
tributes, usual from all products listed in the platform.
Choose the right attributes to store is important and
determinant as an input to the proposed algorithm, so
the ones selected are: product name (p
n
), product cat-
egory (p
c
), minimum price (Qpmn), maximum price
(Qpmx), user average rating (Qs) and number of com-
ments (Qr).
4.2.2 Categorize the User‘s Preferences
In COREL, the user‘s preferences are predict iden-
tified, in other words, through the interactive steps
(1) Heat Model, (2) A hierarchical Bayesian Discrete
Choice Model and (3) Collaborative Filtering, shown
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
570
in the figure 1. The model seeks to predict the tastes
that the consumer will have for a given product from
data of products that the same has already acquired, of
product preferences data (number of comments, user
average rating, etc.) reported by the consumer that
is believed to be of greater relevance and consumers
who have similar tastes, to predict the preferences that
certain user of the system will have at the moment of
purchase of products.
The context of the previous paragraph is not the
same that Giftr has, after all the user will inform his
tastes based in products of different categories, as
smartphone, computer, among others. This prefer-
ences will be use to make this step of the recommen-
dation algorithm, which does not have any method to
predict the tastes of the user as COREL.
As presented in section 4.2.1, the user must in-
sert a string (p
s
) which represents the preferences of
the user and the category (p
c
) associated, based on
the categories from Buscap
´
e (Buscap
´
e, 2016). In this
way, this data will serve as input to the next step of
the recommendation algorithm, and for this motive it
will be saved.
4.2.3 Products Candidates List
In this step will be fulfilled the products listening (p
j
)
that it will be used for the calculations in the next step.
To list the candidates products is need to inform two
important data for the use of the Offers API of Lo-
madee, using the consult API called ”Find Product
List”, the keyword (p
s
) and the category (p
c
) of the
preference informed by the user in the mobile appli-
cation to the API returns the existent products in Bus-
cap
´
e associated with p
s
and p
c
.
In the Lomadee API, the data input is made
through a url and the products that are returned using
the API does not have a defined quantity, therefore it
is necessary define in a empirical way the quantity of
products that will be in the candidates products list,
given that the algorithm will run in a mobile applica-
tion with a limited hardware.
The Giftr user has the possibility to inform many
of his preferences and categories associated it, for this
reason, the scope to the products listing is limited a
one single category (p
c
= 1), nevertheless, having the
possibility of have one or more keywords associated
to this category (s Z|s > 1), for example, ”iPhone”
and ”Samsung Galaxy” as keywords and the category
being ”cellphone and smartphone”.
In the final of this step, there are ”n” candidates
products listed w.
4.2.4 Probability Calculation
This step consists, briefly, in the calculation of the
user (c
k
) to be interested by the product (p
j
), compar-
ing the characteristics Qpmn and Qpmx of this prod-
uct with the one rated product (p
i
), both in the same
category.
The probability calculation proposed in this arti-
cle differs a lot of the base article (Qiu et al., 2015),
because in it the calculation is accomplished using a
methodology shown in the figure 1 through the proba-
bility calculation of P(d
j
|c
k
) (equation 5). In the cal-
culations of the proposed algorithm in this article, it
will not be a specific equation for the probability cal-
culation, in this case it will be a sequence of steps that
will define the products with the highest probability
that the user will be interested.
To do so, this step will be subdivided into three
substeps so that the products with the highest proba-
bility are listed, they are:
1. Make a price comparison between the favored
product and the candidate;
2. Filter the candidate products that deviate from
the minimum and maximum price of the favored
product;
3. Elaborate the rank of the candidate products based
on the minimum and maximum prices.
4.2.5 Make a Price Comparison between the
Favored Product and the Candidate
Product
The first step in this substep is the search of the stored
data of the product favored by the user, output from
the step described in the section 4.2.2, because they
will be the basis for comparisons with the candidate
products, as well as to retrieve the data of all prod-
ucts from the candidate product list (w), output of the
substep described in the section 4.2.3.
The parameters that will be used are from the
product evaluated by the user: p
n
, Qpmn and Qpmx.
The first parameter will be necessary for the identi-
fication of the product, the second and third are the
parameters that best show the characteristic of this
product, among other parameters that the API returns
in the query and the parameters that will be used for
pc will be the same as pn.
Given the parameters to be used, the calculations
to be performed for the comparison of p
j
and p
i
are:
PQmn =
Qpmn(p
j
)
Qpmn(p
i
)
(8)
where,
Mobile Gift Recommendation Algorithm
571
Qpmn(p
j
) is the minimum price of p
j
, Qpmn(p
i
)
is the minimum price of p
i
, PQmn the proportion of
Qpmn(p
j
) in relation to Qpmn(p
i
), and
PQmx =
Qpmx(p
j
)
Qpmx(p
i
)
(9)
where,
Qpmx(p
j
) is the maximum price of p
j
, Qpmx(p
i
)
is the maximum price of p
i
, PQmx the proportion of
Qpmx(p
j
) in relation to Qpmx(p
i
).
A separate calculation for the minimum (PQmn)
and maximum (PQmx) prices shall be performed,
where the calculations are intended to show how pro-
portionally the maximum and minimum price of p
j
in
relation to p
i
, and thereby identify the p
j
which most
closely resemble the prices of p
i
. This substep is then
terminated and the generated data is saved for use in
the next substeps of the algorithm, in this way the list
of candidate products (w) is updated with the values
of the proportions calculated from equations 8 and 9.
4.2.6 Filter the Candidate Products that Diverge
of the Minimum and Maximum Price of
the Favored Product
This substep has as input the updated list w, with the
values of the proportions of the minimum and maxi-
mum prices of the products p
j
. Thus, the objective of
this sub-step is to filter products that diverge from ”x”
percent of the base (minimum and maximum) prices
of p
i
and exclude those that exceed a threshold per-
centage value.
To calculate the proportional percentage that the
parameters Qpmx and Qpmn of p
j
have relative to
the same parameters of p
i
, it is necessary to perform
the following calculations:
PcQmx = PQmx × 100 (10)
PcQmn = PQmn × 100 (11)
The equations 10 and 11 indicate the proportional
percentage of the minimum and maximum price of p
j
in relation to p
i
. In order for filtering of products p
j
to occur, a threshold percentage value (p
l
) is required
both downward and upward of the base value, such
as, for example, ten percent up and down of the one
hundred percent of the minimum and maximum price
of p
i
, and the definition of the value of p
l
is made
empirically.
Then with the percentage values PcQmx and
PcQmn for each product, the classification of those
that comply with the percent limit p
l
is carried out. If
any product has PcQmx and PcQmn outside the per-
cent limit p
l
, it is excluded from the list of candidate
Table 1: Truth Table.
Qpmn Qpmx Qpmn
W
Qpmx Result
1
1 1
It is not excluded
1
0 1
It is not excluded
0
1 1
It is not excluded
0
0 0
It is excluded
products, if only one of the percentage values is not
in the limit p
l
the product Is not excluded from the w
list, as is the case that PcQmx and PcQmn are within
the limit, as shown in Table 1.
If there are many candidate products at the end
of this filtering, it may be necessary to define a limit
number so that there are no performance problems in
the algorithm, this number must be defined empiri-
cally.
4.2.7 Elaborate the Rank of the Candidate
Products based on the Minimum and
Maximum Prices
Based on the calculations of the previous substep of
the price ratio Qpmn and Qpmx of p
j
with respect
to p
i
, the list w contains the p
j
all disordered. The
purpose of this substep is to sort the list based on the
PcQpmn and PcQpmx data.
Pcm =
PcQmx + PcQmn
2
(12)
Since there are two distinct data, PcQmn and
PcQmx, in order to sort the list in a way that is more
optimized, the arithmetic mean of these two values
(Pcm) will be given so that only one value For the
comparison at the time of the descending ordering of
the products, as shown in the equation 12.
4.3 List of Recommended Products
The purpose of this step is to reorder the list w based
on the comparison of two more parameters of p
j
and
p
i
, Qs and Qr. The motivation of this reordering is to
give more credibility to the ordering of products in the
list, based on the data that Lomadee makes available
in its API.
The parameter Qr informs the amount of com-
ments that a product obtained in Buscap
´
e, and can
be used as a way to give credence to the value given
by Qs, that is, if a product has Qs equal to 9.0 and
another one has 9.0, what has a higher value of com-
ments (Qr) will have a greater relevance in relation to
the other.
Pd =
Qs
Qr
(13)
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
572
The parameter Pd then indicates the credibility to
the value of Qs, in case the closer to zero Pd is, the
greater the credibility of Qs, because Qr tends to be
a larger value. Then for the reordering will be used
Pd, plus the list w already found, so that the reorder-
ing is re-done without taking into account the one
performed by the step of the previous algorithm, the
value of pd will be added to Pcm:
Pw = pd + Pcm. (14)
Pw is the base value for descending reordering of
the w list, which takes into account Pcm of the first or-
dering of the third substep described in Section 4.2.7.
At the end of this step, the w list has the products p
j
in the order of importance to be recommended to the
user.
5 CONCLUSIONS
Through the execution of this work, it was possible
to perceive the relevance of a product recommenda-
tion algorithm in the context of e-commerce appli-
cations. Therefore, the solution of this problem by
means of an algorithm has been intensely discussed in
academic papers that seek to create better algorithms
as presented in the Systematic Review.
Through the Systematic Review, we investigated
possible gift recommendation solutions that take into
account the user profile. Among the solutions found,
the one that best matches the context of this work is
the COREL framework.
The Giftr application is an iOS platform applica-
tion that uses the Lomadee API, provided by Buscap
´
e,
where you can search for products and subscribe to
user preferences. However, this application does not
use the data received to process suggestions of the
best products to the user.
5.1 Future Works
So the next step is to implement this algorithm in the
mobile application Giftr and define the value of some
variables in the algorithm which needed to be defined
empirically. Then, run tests and optimize this pro-
posed algorithm for mobile devices.
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. Piscataway
NJ, United States.
Balabanovi, M. and Shoham, Y. (1997). Fab: content-
based, collaborative recommendation. New York NY,
United States.
Burke, R. (2002). Hybrid Recommender Systems: Survey
and Experiments. California State University, Fuller-
ton.
Buscap
´
e (2016). http://www.buscape.com.br. Accessed on:
November 26th 2016.
Company, B. (2016). http://developer.buscape.com.br/portal.
Accessed on: November 26th 2016.
de Braslia, U. C. (2016). http://www.bepiducb.com.br/. Dis-
trito Federal DF, Brasil. Brazilian Education Pro-
gramm for iOS Development.
de Souza, A. E. R. (2013). Um modelo para recomendac¸
˜
ao
de cursos de especializac¸
˜
ao baseado no perfil profis-
sional do candidato. Dissertac¸
˜
ao (Mestrado) - Uni-
versidade Presbiteriana Mackenzie - So Paulo.
do Nascimento, A. R., da Ssilva, B. F., and dos Santos, G. G.
(2009). E-commerce: O Melhor Caminho no Mercado
Atual.
Gama, R., Andr
´
e, N., Pereira, C., Almeida, L., and Pinto,
P. (2011). Algoritmo de Recomendac¸
˜
ao Baseado em
Passeios Aleat
´
orios num Grafo Bipartido.
Keele, S. (2007). Guidelines for performing Systematic Lit-
erature Reviews in Software Engineering.
Lomadee (2016a). http://developer.buscape.com.br/portal/
lomadee/api-de-ofertas/introducao. Accessed on:
November 26th 2016.
Lomadee, O. A. (2016b). http://developer.buscape.com.br/
portal/lomadee/api-de-ofertas/recursos. Accessed on:
November 26th 2016.
Lomadee, P. (2016c). http://developer.buscape.com.br/
portal/lomadee. Accessed on: November 26th 2016.
Mendes, R. (2016). Os n
´
umeros do mercado de e-
commerce. Accessed on: November 26th 2016.
Ponte, J. M. and Croft, W. B. (1998). A language Modeling
Approach to Infomation Retrival.
Qiu, J., Lin, Z., and Li, Y. (2015). Predicting customer pur-
chase behavior in the e-commerce context. Springer
Science.
Resnick, P. and Varian, H. R. (1997). Recommender Sys-
tems.
Zan Huang, Daniel Zeng, H. C. (2004). A Compara-
tive Study of Recommendation Algorithms in E- Com-
merce Applications.
Mobile Gift Recommendation Algorithm
573