A Recommendation Engine based on Adaptive Automata
Paulo Roberto Massa Cereda and João José Neto
Escola Politécnica, Departamento de Engenharia de Computação e Sistemas Digitais, Universidade de São Paulo,
Av. Prof. Luciano Gualberto, s/n, Travessa 3, 158, CEP: 05508-900, São Paulo, SP, Brasil
Keywords:
Adaptive Automata, Recommendation Engine.
Abstract:
The amount of information available nowadays is huge and in raw state; systems have to act proactively on
selecting and presenting context-relevant information, but such feature is time-consuming an exhaustive. This
paper presents a recommendation engine based on an adaptive rule-driven device namely, an adaptive au-
tomata – as a lightweight scalable alternative to usual approaches on resource recommendation. The technique
employed here is based on frequency analysis instead of relying on usual machine learning.
1 INTRODUCTION
The growth of social media and the diffusion of the
Internet itself brought several challenges to the way
data are traditionally analyzed; the amount of infor-
mation available is huge and in raw state. In order
to enhance browsing and learning experience, sys-
tems have to be proactive by selecting and present-
ing context-relevant information, for example, offer-
ing related subjects in an e-learning environment or
by suggesting movies based on customers history
records; such feature is usually time-consuming and
exhaustive for the whole computational infrastruc-
ture (Cereda and José Neto, 2014).
Adaptivity is the term used to denote the ability
of a device to modify its own behavior without exter-
nal interference (José Neto, 1994). For example, in
a chess game, such modifications are triggered as the
application of a rule pattern given a certain situation,
like a pawn that advances all the way to the opposite
side of the chess board and triggers a rule which pro-
motes it to another piece of that player’s choice; the
pawn now has its own behavior changed to another
piece and may act like so. Any rule-driven device
can exploit the self-modification feature by adding
an adaptive layer on top of its underlying rule set.
In this paper, we will use an adaptive automata as
computational model, which is proven to be Turing-
complete (Rocha and José Neto, 2000).
We present here a simple and fast recommen-
dation engine that uses a well-known computational
model enhanced with an adaptive mechanism as a
lightweight alternative to usual approaches for tack-
ling raw data and trying to extract patterns and be-
haviors in situations for which absolute answers are
too costly, and suboptimal solutions can be accepted.
The use of an adaptive rule-driven device allows a
compact yet expressive model which escalates on de-
mand based on the current usage scenario (Cereda and
José Neto, 2014).
2 BACKGROUND
There is a vast literature on how to identify and rec-
ommend resources that are relevant for a person or a
group of people based on a couple of criteria. One of
the most known methods for this purpose is called a
recommender system (Resnick and Varian, 1997).
Recommender systems usually rely on two tech-
niques known as collaborative and content-based fil-
tering. The former is preference-oriented, recom-
mending resources according to information obtained
from groups of people that share similar trends and
behaviors (Su and Khoshgoftaar, 2009). The latter
is profile-oriented, which classifies resources and rec-
ommends similar ones based on interests of some
person (Lops et al., 2011). Both techniques do
have shortcomings, such as data sparsity and scalabil-
ity (Cacheda et al., 2011); hybrid versions are usually
employed in order to explore the strongest points of
each original approach without ignoring the current
context being considered (Adomavicius and Tuzhilin,
2005).
More recently, machine learning algorithms have
been used for extracting association rules based on
594
Cereda P. and José Neto J..
A Recommendation Engine based on Adaptive Automata.
DOI: 10.5220/0005346305940601
In Proceedings of the 17th International Conference on Enterprise Information Systems (ICEIS-2015), pages 594-601
ISBN: 978-989-758-097-0
Copyright
c
2015 SCITEPRESS (Science and Technology Publications, Lda.)
available data and finding patterns and trends (Go-
tardo et al., 2013). The main purpose is to establish
correlation rules amongst resources. Although being
extremely powerful, such techniques are very expen-
sive in terms of computational efforts and might de-
mand an impractical time, depending on the size of
the data and how resources are represented in the sys-
tem (Yahia and Murtada, 2010).
Cereda et al. (Cereda et al., 2009) describe an al-
ternative approach for recommender systems, relying
on discrete metrics and adaptive techniques. The rec-
ommendation process was managed by an adaptive
rule-driven recognizer; by submitting two resources
r
i
and r
j
to the recognizer M as an input string w,
for example, if w L(M) means that r
j
could be a
good recommendation given r
i
and vice versa. One of
the most interesting aspects pointed out by that early
work was the model efficiency, since it could handle
queries on a pair of related resources in polinomial
time based on the length of the input string.
The main shortcoming of this approach, however,
is the lack of proactivity, that is, the recognizer ac-
cepts/rejects queries about related resources, but it
does not answer which resource could be a recom-
mendation. Besides, the model suffers from data spar-
sity, leading to a problem known as cold start (Basiri
et al., 2010). Inspired by this initial work, we propose
here a new model, built from scratch, which aims at
minimizing the effects of data sparsivity and cold start
and offering a lightweight scalable alternative to usual
approaches on resource recommendation.
It is worth noting that most approaches so far
take the artificial intelligence path (Adomavicius
and Tuzhilin, 2005), including graph-based recom-
mender systems using an n-layer approach in order
to establish correlation rules amongst relevant re-
sources (Huang et al., 2004); however, the number of
layers and resources might greatly increase data spar-
sity and increase computational processing. Our goal
in this paper is an attempt to provide a new model
based on an adaptive rule-driven device namely,
an adaptive automaton that escalates on demand
according to the current scenario, reducing the ef-
fects of data sparsity and handling queries in poli-
nomial time in order to recommend context-relevant
resources. Such features are desirable specially when
dealing with a huge amount of raw data.
3 THE RECOMMENDATION
ENGINE
In this section, we present an adaptive rule-driven de-
vice being used to implement a recommendation en-
gine. We opted for an adaptive automaton (José Neto,
1994; José Neto, 2001), which consists of a traditional
automaton as underlying device with the addition of
an adaptive mechanism, as seen in Fig. 1; such mech-
anism allows the device to change its own configura-
tion on runtime by invoking adaptive functions which
can modify the underlying set of rules.
(Q,Σ,P,q
0
,F)
finite automaton
adaptive mechanism
Figure 1: An adaptive automaton.
We provide a list of elements used in this section
for quick reference; refer to Table 1 for a complete
description of the symbols used in the text.
Let us consider a set R of resources. A resource
might be any object relevant to a given context, e.g,
books in a bookstore or dishes in a restaurant. For
our example, the number of elements in R is fixed,
although it is easy to change this model in order to
obtain a recommendation engine that considers re-
sources added on-the-fly.
The adaptiveautomatonof our model has all avail-
able resources from R represented as states (Q
R
sub-
set), but only related resources are connected through
transitions. Connection between two resources may
contain intermediate states indicating the strength of
the connection; the first occurrence of a pair of re-
sources triggers the adaptive mechanism which adds
transitions from one to another, and later occurrences
will increase this path by adding intermediate states.
The number of intermediate states in a path is used to
discover the best resource r
j
given r
i
. It is worth not-
ing that paths are established if and only if there is an
occurrence of pairs of resources, greatly reducing the
model size.
A resource r
i
may establish connection with an ar-
bitrary number of other resources from R; such con-
nections indicate possible trends from a group of peo-
ple or even describe mutual dealings among resources
(set T of special symbols). Our choice was modeling
resource connections not as a single two-way symbol
but as a pair of unidirectional ones, that is, a link be-
tween r
i
and r
j
will result in both τ
(r
i
,r
j
)
and τ
(r
j
,r
i
)
.
This is helpful if we want to keep track of the path
to follow when analyzing possible recommendations
or if we do not want to consider commutativity be-
tween two resources. For the scope of our paper, we
are considering that commutativity is allowed.
Fig. 2 represents the adaptive automaton M of our
recommendation engine. For illustration purposes,
ARecommendationEnginebasedonAdaptiveAutomata
595
Table 1: List of elements for quick reference.
Element Meaning Example
Q set of states Q = {q
0
,q
pizza
,q
chips
}
F Q subset of accepting states F = {q
pizza
,q
chips
}
q
0
Q initial state
R set of resources R = {pizza,chips}
Q
R
Q subset of states associated with resources,
|Q
R
| = |R|
Q
R
= {q
pizza
,q
chips
}
T set of special symbols representing links amongst
resources, |T| =
|R|!
/(|R|−2)!
T = {τ
(pizza,chips)
,τ
(chips,pizza)
}
τ
(r
i
,r
j
)
T link between two resources r
i
and r
j
, with
r
i
,r
j
R, i, j N, i 6= j
τ
(pizza,chips)
D set of adaptive functions D = {A ,B}
Σ input alphabet Σ = {α,pizza,chips}
α resource pair delimiter
P P: D {ε} × Q× Σ 7→ Q× Σ {ε} × D {ε},
mapping relation
P = {(A (pizza),q
0
,pizza) 7→
(q
0
,ε,ε),(A (chips),q
0
,chips) 7→
(q
0
,ε,ε)}
A(r)· adaptivefunction A D with argument r
i
triggered
before the symbol consumption
·B(q,x,z) adaptivefunction B D with arguments q,x,z trig-
gered after the symbol consumption
f
Q
: R 7→ Q
R
function that takes a resource r
i
R and returns its
associated state q
r
i
Q
R
f
Q
(pizza) 7→ q
pizza
G: Q
R
7→ R output relation that maps each state q
r
i
Q
R
repre-
senting a resource r
i
R into a resource
r
j
R {r
i
}
G(pizza) 7→ chips
argmaxA R y
max
= max
(x,y)A
y, then
argmaxA = {x R | (x,y
max
) A} is the set of x
on which y is maximized
argmaxA = {(egg,7),(pizza, 5),
(bacon,7),(spam,6)} =
{egg,bacon}
?(a,b,c)
(d, e, f)
rule-searching elementary adaptive action that
searches P for rules matching the given pattern
(a, f D {ε}, b,d Q,c Σ,e Σ {ε})
(a,b, c)
(d, e, f)
rule-erasing elementary adaptive action that re-
moves rules matching the given pattern from P
(a, f D {ε}, b,d Q,c Σ,e Σ {ε})
+(a,b, c)
(d, e, f)
rule-inserting elementary adaptive action that adds
rules with a specified pattern to
P (a, f D {ε},b,d Q,c Σ,e Σ {ε})
we wrote a very simple automaton with just a pair of
resources, R = {r
1
,r
2
}, so the recommendation here
is quite obvious; nevertheless, it is enough for allow-
ing the observation of how the adaptive layer operates
when changing the automaton topology.
As seen in Fig. 2 (a), the initial state q
0
has a
loop for each resource r
i
with an associated paramet-
ric adaptive function A with argument r
i
triggered be-
fore the symbol consumption from the string of re-
source names. The call to the adaptive function A(r
i
)
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
596
q
0
q
r
1
q
r
2
r
1
,A(r
1
)·
r
2
,A(r
2
)·
(a) The initial topology of the adap-
tive automaton M for a couple of re-
sources. Let us recognize w = r
1
r
2
,
that is, two related resources.
q
0
q
r
1
q
r
2
r
2
,A(r
2
)·
r
1
α
r
2
,A(r
2
)·
(b) The new topology of the adap-
tive automaton M after recognizing
r
1
. So far, no resource is related to
r
1
. Now let us recognize r
2
.
q
0
q
r
1
q
r
2
r
1
r
2
α
α
τ
(r
1
,r
2
)
τ
(r
2
,r
1
)
r
2
,
·B(q
r
1
,
τ
(r
1
,r
2
)
,
τ
(r
2
,r
1
)
)
r
1
,
·B(q
r
2
,
τ
(r
2
,r
1
)
,
τ
(r
1
,r
2
)
)
(c) The new topology of the adaptive automaton M af-
ter recognizing a pair of resources r
1
r
2
, now related.
Figure 2: An adaptive automaton M being used as a recommendation engine for a set of resources R containing r
1
and r
2
.
(from set D of adaptive functions) will evoke a new
configuration, with a transition from q
0
targeting state
q
r
i
consuming the symbol r
i
. In our example, q
0
has
now a transition to q
r
1
consuming r
1
(Fig. 2 (b)); ac-
cording to the input string format, r
2
is related to r
1
,
so a call to A(r
2
) in q
r
1
will evoke a new configura-
tion (Fig. 2 (c)), where these two resources are now
related.
If a resource has not been considered in the rec-
ommendation engine yet (Fig. 2 (a) with resource r
1
),
a modification is performed in the automaton topol-
ogy in order to accommodate the newly considered
resource; that is done through a call to the adaptive
function A (Algorithm 1), which will remove and add
transitions based on a set of elementary adaptive ac-
tions defined in the adaptive function body. Similarly,
if an unconsidered resource is related to an existing
one, not only this resource must be considered, but
the recommendation path will also be built between
them (as seen in Fig. 2 (b) with the loop in q
r
1
, and
the resulting recommendation path in (c) between r
1
and r
2
). Adaptive function A takes one parameter
denoting the resource to be considered. The syntax
used in the function body and a complete descrip-
tion of elementary adaptative actions can be found in
(José Neto, 1994).
If both resources r
i
and r
j
have been considered
in the engine before, there will be a transition from
q
0
to q
r
i
consuming r
i
and from q
r
i
to q
r
j
consuming
r
j
with a call to the adaptive function B. Adaptive
function B increments the number of transitions and
intermediate states between two resources by adding
a newly inserted state (chosen by a generator g
in the
function body) and modifying existing transitions in
order to accommodate such new element in the rec-
ommendation path. The function takes three param-
eters denoting the source state followed by two link
symbols τ
1
,τ
2
T.
Algorithm 1: Adaptive function A(r).
Summary: this function modifies the automaton topology
in order to accommodate the newly considered resource r;
it creates recommendation paths between r and each con-
sidered resource; at last, it removes the selected transition
from the mapping.
adaptive function A(r)
variables: ?v,?x, ?y,?z
(q
0
,r) q
0
,A(r)·
+(q
0
,r) f
Q
(r)
?(q
0
,?v) ?x
+( f
Q
(r),?v) f
Q
(?v),·B(?v,τ
(r,?v)
,τ
(?v,r)
)
+( f
Q
(?v),r) f
Q
(r),·B (r,τ
(?v,r)
,τ
(r,?v)
)
( f
Q
(r),r) f
Q
(r),·B (r,τ
(r,r)
,τ
(r,r)
)
+( f
Q
(r),τ
(r,?v)
) f
Q
(?v)
+( f
Q
(?v),τ
(?v,r)
) f
Q
(r)
( f
Q
(r),τ
(r,r)
) f
Q
(r)
?(q
0
,?y) q
0
,A(?y)·
+( f
Q
(?v),?y) f
Q
(?v),A(?y)·
( f
Q
(?v),r) f
Q
(?v),A(r)·
?( f
Q
(?v),?z) f
Q
(?v),A(?z)·
+( f
Q
(r),?z) f
Q
(r),A (?z)
+( f
Q
(r),α) q
0
end adaptive function
An example of how adaptive function B modifies
the automaton topology is illustrated in Fig. 3. For
simplicity, only relevant parts of the automaton are
shown.
As seen in Fig. 3, B inserts the new state q
1
be-
tween r
i
and q
j
, rearranges existing transitions and
adds new ones. When any transition holding an as-
sociated adaptive function B is executed, the corre-
sponding recommendation path will increase in num-
ber of intermediate states.
Resources r
i
and r
j
are connected via a recom-
mendation path, composed by their associated states,
q
r
i
and q
r
j
, and an intermediate state q
k
with transi-
ARecommendationEnginebasedonAdaptiveAutomata
597
Algorithm 2: Adaptive function B(q,τ
1
,τ
2
).
Summary: this function adds a new element in the rec-
ommendation path between two resources. The higher the
number of elements, the stronger the path.
adaptive function B(q,τ
1
,τ
2
)
variables: ?v
generators: g
?(q,τ
1
) ?v
(q,τ
1
) ?v
(?v,τ
2
) q
+(q,τ
1
) g
+(g
,τ
2
) q
+(g
,τ
1
) ?v
+(?v,τ
2
) g
end adaptive function
q
r
i
q
r
j
τ
(r
i
,r
j
)
τ
(r
j
,r
i
)
r
j
,·B(q
r
i
,τ
(r
i
,r
j
)
,τ
(r
j
,r
i
)
)
r
i
,·B(q
r
j
,τ
(r
j
,r
i
)
,τ
(r
i
,r
j
)
)
A transition (q
r
i
,r
j
) q
r
j
will trigger an adaptive
function B that will create a new state in the recom-
mendation path between q
r
i
and q
r
j
.
q
r
i
q
1
q
r
j
τ
(r
i
,r
j
)
τ
(r
j
,r
i
)
τ
(r
i
,r
j
)
τ
(r
j
,r
i
)
r
j
,B(q
r
i
,τ
(r
i
,r
j
)
,τ
(r
j
,r
i
)
)
r
i
,B(q
r
j
,τ
(r
j
,r
i
)
,τ
(r
i
,r
j
)
)
The new automaton topology after the execution of
the adaptive function B, with a new state q
2
added
in the recommendation path between q
r
i
and q
r
j
.
Figure 3: An example of the adaptive function B being trig-
gered during the transition from q
r
i
to q
r
j
consuming r
j
,
resulting on adding a new state q
1
and a couple of new tran-
sitions.
tions consuming τ
(r
i
,r
j
)
and τ
(r
j
,r
i
)
. Intermediate states
act as a counter. At the beginning, this path contains
no intermediate state from q
r
i
to q
r
j
; resources are di-
rectly connected through transitions consuming τ
(r
i
,r
j
)
and τ
(r
j
,r
i
)
, as seen in Fig. 2 (c); this is by design
and indicates the strength of the connection between
these resources. The number of intermediate states
in the path from q
r
i
to q
r
j
will be used as a parame-
ter for deciding whether r
j
should be recommended
given r
i
; the more states, the higher chance for r
j
to
be selected. If we go the other way in the path, that
is, from q
r
j
to q
r
i
, the decision changes to whether r
i
should be recommended given q
j
. Alternatively, rec-
ommendation paths could be represented by a global
counter associated with each pair of resources and an
adaptive function that triggers an increment operation
on demand.
It is important to observe that r
i
and r
j
share the
same recommendation path (but of course, not the
same transitions as q
r
i
reaches q
r
j
through τ
(r
i
,r
j
)
and
q
r
j
reaches q
r
i
through τ
(r
j
,r
i
)
), so our model may end
up with at most
|R|
2
recommendation paths, one for
each {r
i
,r
j
} subset, considering that all resources are
related and thus connected. If commutativity does
not hold between a pair of resources, every ordered
pair (r
i
,r
j
) should have its own recommendationpath,
thus, the maximum number of recommendation paths
should be |T|; the link set T already offers symbols
to support non-shared recommendation paths, if this
rule is chosen.
The adaptive automaton M of our recommen-
dation engine accepts strings over the alphabet
Σ = R T {α}, w Σ
, with L(M) = {w Σ
|
w = r
i
|r
i
r
j
(αr
i
r
j
)
,r
i
,r
j
R,r
i
6= r
j
}, in one of the
forms presented as follows.
The first form, w R, denotes w as a single re-
source for which we want to get a recommendation.
Here the idea is to submit w to our automaton and get
an output string w
R {ε}, with w
6= w. For ex-
ample, with R = {egg,bacon,spam}, and submitting
w = egg to the automaton, we should get an output
string w
= bacon, meaning that bacon, based on our
recommendation engine, is a good side dish for eggs.
The occurrence of ε in the output string w
indicates
that no recommendation was found based on the input
string w. For practical purposes, the output relation
always returns a resource r
i
R, but that is a domain-
specific decision.
The second form, w = r
i
r
j
(αr
k
r
l
)
, with
r
i
,r
j
,r
k
,r
l
R,r
i
6= r
j
, α Σ and r
k
6= r
l
, denotes that
w has at least one pair of resources, or a list of pairs
separated by a delimiter α. A string in this form leads
the automaton to change its topology according to the
frequency of each pair of resources; modifications
are possible due to the adaptive mechanism action
triggered by a call to a parametric adaptive function
B associated to specific transitions.
The string w is built from a subset of resources
R
R, |R
| 2, in a transaction, for example, a basket
containing grocery items in a purchase or a café tab.
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
598
In order to build a proper string to denote occurrences
of each pair of resources from R
, we need to obtain all
subsets of two elements of R
, that is, P
2
(R
), and sep-
arate them by using a special symbol α. Algorithm 3
illustrates the building process of the string w from
a subset R
R. For instance, let us consider a set
of resources R = {egg,sausage,bacon,spam} from a
café menu and R
= {egg,bacon,spam} as a breakfast
order; a call to BUILD(R
) would give us the string
w = heggihspamiαheggihbaconiαhbaconihspami.
Algorithm 3: Building string w of shape r
i
r
j
(αr
k
r
l
)
from
R
R,|R
| 2.
Summary: this procedure builds an input string w to be rec-
ognized by the adaptive automaton of our recommendation
engine from a subset R
of resources; it basically iterates
through all subsets of two elements of R
and concatenates
the intermediate results with the resource pair delimiter.
procedure BUILD(R
)
w ε
R
′′
P
2
(R
)
X r R
′′
for x X do
w w· x
end for
R
′′
R
′′
X
if R
′′
6=
/
0 then
for X
R
′′
do
w w· hαi
for x
X
do
w w· x
end for
end for
end if
return w
end procedure
Special symbol α plays the role of a pair separator
when building the input string w in the second form;
since all transitions consuming this symbol target the
initial state, the automaton behaves exactly the same
with all pairs. The set of accepting states F is the
union of the set of states Q
R
representing resources
from R, F = Q
R
,F Q.
One of the goals of the proposed recommendation
engine is to submit an input string w in the first form,
that is, w R, to our automaton and get an output
string w
R {ε}, with w
6= w, as a recommended
resource. In order to achieve that, we need to define
an output relation G associated to each state q
r
Q
R
.
In order to determine which resource r
j
to recom-
mend in terms of resource r
i
, we rely on counting the
number of intermediate states for every recommen-
dation path from r
i
as a metric to indicate a suitable
option. The number of intermediate states between
two resources r
k
and r
l
(dynamically added by adap-
tive function B) gives us the occurrences of the pair
{r
k
,r
l
}; the higher that number, the more frequent the
pair is, and thus, resource r
l
can be a recommenda-
tion for resource r
k
and vice versa. Alternately, an ap-
proach using global counters would simplify the com-
parison step since all values are directly available.
In order to count the intermediate states between r
i
and r
j
and choose the longest recommendation path,
we present a procedure RECOMMEND(r) that takes
a resource r and return its best recommendation, ac-
cording to the highest pair frequency; this is done by
inspecting the current automaton shape. The algo-
rithm relies on counting specific transitions, so the
number of intermediate states from r
i
to r
j
is t 1,
with t being the number of transitions in T which con-
sume τ
(r
i
,r
j
)
. Algorithm 4 illustrates the steps taken
by such procedure in order to get the most suitable
resource.
Algorithm 4: Obtaining the best resource as recommenda-
tion for r R.
Summary: this procedure that takes a resource r and return
its best recommendation, according to the highest pair fre-
quency; this is done by counting specific intermediate states
procedure RECOMMEND(r)
X {}
for r
i
R,r
i
6= r do
X
{(q
,τ
r,r
i
) q
′′
P | q
,q
′′
Q}
X X {(r
i
,|X
|)}
end for
X
′′
argmaxX
return x X
′′
end procedure
Using the procedure presented in Algorithm 4, the
output relation G maps every state q
r
i
Q
R
represent-
ing resource r
i
into a call to RECOMMEND(q
r
i
) which
returns a resource r
j
6= r
i
as recommendation; in other
words, we get G = {(q
r
) RECOMMEND(q
r
) | q
r
Q
R
},
4 EXPERIMENTS AND
DISCUSSIONS
We developed two experiments in order to illus-
trate an evaluation of the recommendation engine
proposed in this paper. First, we generated a
data sample from a set R of 5 resources, R =
{egg,sausage, bacon,beans,spam}, simulating sev-
eral breakfast orders in a café; the data sample size
ranged from 10 to 1000 entries. It is important to
ARecommendationEnginebasedonAdaptiveAutomata
599
mention that orders with just one item were discarded
since you cannot establish a connection with other
items in the same order.
First Experiment The first experiment consisted
of checking the hits of our recommendation engine
[#1] compared to traditional association rule algo-
rithms, namely Apriori [#2] (Agrawal and Srikant,
1994), PredictiveApriori [#3] (Scheffer, 2001), FP-
Growth [#4] (Han et al., 2000) and Tertius [#5] (Flach
and Lachiche, 1999). For this experiment, we used a
sample size of 100 entries. All algorithms were exe-
cuted in a 64-bit Linux environment with the help of
the WEKA data mining software (Hall et al., 2009).
The results are presented in Table 2. The parameters
for each algorithm were automatically set by WEKA.
Table 2: Hits in the first experiment.
1 2 3 4 5
egg bacon spam
sausage egg egg egg
bacon spam spam spam beans
beans bacon bacon bacon
spam bacon beans bacon
1. Our model, 2. Apriori, 3. PredictiveApriori,
4. FPGrowth, 5. Tertius
According to Table 2, Apriori and FPGrowth
could not provide valid association rules based on the
sample data (note that some rules are not valid in our
context and were discarded, for example, if a cus-
tomer doesn’t order bacon, he won’t order spam; we
want to recommendresources solely based on positive
input); by increasing the sample size, both algorithms
start convergingto the rules obtained from our model.
PredictiveApriori and Tertius had a very similar out-
put, although the latter had one miss when trying to
extract a rule for an certain order.
It is also worth noting that the number of resources
in R plays an important role in our experiment, since
traditional association rule algorithms extract rules
based on the power set of R, that is, P (R), and this
set might become huge with many elements in R. Our
model simply tries to establish rules based on one re-
source in terms of another, using just all subsets of
two elements of R, that is, P
2
(R), which is quite suf-
ficient for our domain-specific problem.
In general, the results were significant since the
design of our model employs an optimized straight-
forward technique (namely, frequency analysis) and
at some extent the outcome came very close to more
sophisticated algorithms such as the ones used in the
experiment. We were able to extract meaningful con-
nections at a low cost, minimizing the cold start prob-
lem. The key point for a recommendation context
is that suboptimal answers are also valid, and thus
a more balanced model in terms of hits and perfor-
mance might be an interesting approach.
Second Experiment The second experiment con-
sisted of measuring the execution time of our recom-
mendation engine compared to traditional association
rule algorithms (the ones used in the first experiment).
We tested the performance of each approach with the
data sample size ranging from 10 to 1000 entries, for
1000 times.; the overview of the second experiment is
in Table 3.
Table 3: Execution time in seconds of all approaches in the
second experiment, with the data sample size ranging from
10 to 1000 entries. Values are represented in scientific no-
tation, ×10
3
.
Size 1 2 3 4 5
10 0.2 3.5 72.1 0.1 11.2
50 0.7 3.6 203.0 2.5 16.2
100 1.8 3.9 336.0 1.4 29.2
250 2.3 4.2 454.5 3.8 40.9
500 4.3 8.7 821.9 6.3 120.1
750 6.4 16.8 1187.6 9.5 180.6
1000 8.7 18.3 1110.4 9.1 178.6
1. Our model, 2. Apriori, 3. PredictiveApriori,
4. FPGrowth, 5. Tertius
According to Table 3, and based on data from Ta-
ble 2, the algorithms with better predictions were also
the more time-consuming ones. This is quite under-
standable, since several calculi are employed in order
to get the best possible association rule. We can ob-
serve that our model had one the best performances
amongst all approaches and still with a significant
prediction rate. Perhaps the most important fact from
this experiment is that our model does not suffer from
data sparsity, since resource connections are only es-
tablished when needed.
5 CONCLUSIONS
In this paper, we presented a recommendation en-
gine that uses an ad-hoc adaptive automaton spe-
cially designed as a lightweight alternative to exist-
ing approaches on resource recommendation. The
model is compact, efficient and offers suboptimal an-
swers which are good enough for several specific con-
texts (Hatem and Ruml, 2014).
As a result of this work, we have achieved a rec-
ommendation engine based on a formalism that can
be easily modified or extended in order to cover sev-
ICEIS2015-17thInternationalConferenceonEnterpriseInformationSystems
600
eral contexts (Cereda and José Neto, 2014). We have
reached an interesting balance between performance
and prediction, as seen in the two experiments in Sec-
tion 4, with no significant effects of data sparsity and
cold start. As future work, an additional adaptive
function C can be used to modify recommendation
paths on higher levels (for example, r
i
to r
j
through
r
k
).
The use of an adaptive rule-driven device pro-
vides simplicity and representation power; the rec-
ommendation engine shown here has a wide scope
and may also be used along with usual artificial in-
telligence techniques, exploring the strongest points
of both sides, and achieving good results when solv-
ing real world problems(José Neto, 2001; Cereda and
José Neto, 2014).
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
Transactions on Knowledge and Data Engineering,
17:734–749.
Agrawal, R. and Srikant, R. (1994). Fast algorithms for
mining association rules. In Proceedings of the 20th
International Conference on Very Large Data Bases,
pages 487–499.
Basiri, J., Shakery, A., Moshiri, B., and Hayat, M. (2010).
Alleviating the cold-start problem of recommender
systems using a new hybrid approach. In 5th Inter-
national Symposium on Telecommunications, pages
962–967.
Cacheda, F., Carneiro, V., Fernández, D., and Formoso, V.
(2011). Comparison of collaborative filtering algo-
rithms: Limitations of current techniques and propos-
als for scalable, high-performance recommender sys-
tems. ACM Transactions on the Web, 5:2:1–2:33.
Cereda, P. R. M., Gotardo, R. A., and Zorzo, S. D. (2009).
Resource recommendation using adaptive automaton.
In 16th International Conference on Systems, Signals
and Image Processing, pages 1–4.
Cereda, P. R. M. and José Neto, J. (2014). Adaptive data
mining: Preliminary studies. IEEE Latin America
Transactions, 12(7):1258–1270.
Flach, P. and Lachiche, N. (1999). Confirmation-guided
discovery of first-order rules with Tertius. Machine
Learning, 42:61–95.
Gotardo, R. A., Hruschka Júnior, E. R., Zorzo, S. D., and
Cereda, P. R. M. (2013). Approach to cold-start prob-
lem in recommender systems in the context of web-
based education. In Proceedings of the 12th Interna-
tional Conference on Machine Learning and Applica-
tions (ICMLA), 2013, volume 2, pages 543–548, Mi-
ami, FL.
Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann,
P., and Witten, I. (2009). The WEKA data mining
software: an update. SIGKDD Explorations, 11(1).
Han, J., Pei, J., and Yin, Y. (2000). Mining frequent pat-
terns without candidate generation. In Proceedings of
the 2000 ACM–SIGMID International Conference on
Management of Data, pages 1–12.
Hatem, M. and Ruml, W. (2014). Bounded suboptimal
search in linear space: New results. In Proceedings
of the Seventh Annual Symposium on Combinatorial
Search, pages 89–96, Prague, Czech Republic. AAAI
Press.
Huang, Z., Chung, W., and Chen, H. (2004). A graph model
for e-commerce recommender systems. Journal of the
American Society for information Science and Tech-
nology, 55(3):259–274.
José Neto, J. (1994). Adaptive automata for context-
dependent languages. SIGPLAN Notices, 29(9):115–
124.
José Neto, J. (2001). Adaptive rule-driven devices: general
formulation and case study. In International Confer-
ence on Implementation and Application of Automata.
Lops, P., Gemmis, M., and Semeraro, G. (2011). Content-
based recommender systems: State of the art and
trends. Recommender Systems Handbook, 1:73–105.
Resnick, P. and Varian, H. (1997). Recommender systems.
Communications of the ACM, 40:55–58.
Rocha, R. L. A. and José Neto, J. (2000). Autômato adap-
tativo, limites e complexidade em comparação com
a Máquina de Turing. In Proceedings of the Second
Congress of Logic Applied to Technology, pages 33–
48.
Scheffer, T. (2001). Finding association rules that trade sup-
port optimally against confidence. In 5th European
Conference on Principles of Data Mining and Knowl-
edge Discovery, pages 424–435.
Su, X. and Khoshgoftaar, T. M. (2009). A survey of col-
laborative filtering techniques. Advances in Artificial
Intelligence, 2009:4:2–4:2.
Yahia, M. E. and Murtada, E. E. (2010). A new approach
for evaluation of data mining techniques. IJCSI Inter-
national Journal of Computer Science Issues, 7:181–
186.
ARecommendationEnginebasedonAdaptiveAutomata
601