<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Autonomous Learning of User's Preferences improved through User Feedback</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Asier AZTIRIA</string-name>
          <email>aaztiria@eps.mondragon.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Juan Carlos AUGUSTO</string-name>
          <email>jc.augusto@ulster.ac.uk</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alberto IZAGUIRRE</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Mondragon</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Ulster</institution>
          ,
          <country country="UK">United Kingdom</country>
        </aff>
      </contrib-group>
      <fpage>72</fpage>
      <lpage>86</lpage>
      <abstract>
        <p>Ambient Intelligent (AmI) environments are supposed to act proactively anticipating the user's needs and preferences, therefore the capability of an AmI system to learn those elements out of daily life behaviour of those using the environment is very valuable. In this paper we present a system that discovers patterns related to user's actions and improves them through user feedback. The core of this system is an algorithm which taking as starting point information collected by sensor discovers these patterns. Coupled with the algorithm, a language to represent those patterns has been developed. This system allows the user experiencing the AmI environment to verbally interact with the system and give his/her feedback about patterns that have been discovered. The speech based interaction provides a natural communication for the user and the simple protocol established makes the system available to users without sophisticated training.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>Ambient Intelligence</kwd>
        <kwd>Learning Behavioral Patterns</kwd>
        <kwd>Temporal Relations</kwd>
        <kwd>Human-Computer Interaction</kwd>
        <kwd>Speech-based Interaction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Ambient Intelligence (AmI) [
        <xref ref-type="bibr" rid="ref11 ref4">4,11</xref>
        ] refers to ‘a digital environment that
proactively, but sensibly, supports people in their daily lives’ [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Other terms such
as Ubiquitous Computing [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] or Smart Environments [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] are used with similar
connotations. Supporting people in their daily lives means, for example, making
an environment safer, more comfortable and more energy efficient. In order to
achieve these objectives, the environment should learn patterns of user behavior
in a unobtrusive and transparent way. The acquired patterns allow, as well as
the understanding of behavior, the automation of devices and detection of
hazardous or abnormal situations. Proactive and autonomous system behaviour in
these situations can then help the user to have a more comfortable and safer life.
      </p>
      <p>In this paper, we explain the Patterns of User Behavior System (PUBS) which
is a system that allows AmI environments to learn such behavioral patterns. The
core of this system is AP UBS , an algorithm that discovers patterns using the
information collected by sensors. The language LP UBS included within PUBS
provides a standard framework to represent patterns with clear syntax and facilitates
the definition of algorithms as well as the interaction with the user.</p>
      <p>Finally, due to essential role of users in AmI environment, PUBS includes
a speech recognition based interface, IP UBS , which allows the user to interact
with PUBS either accepting, deleting or modifying the discovered patterns. The
essential components of the PUBS architecture are shown in Figure 1.</p>
      <p>The rest of the paper is organized as follows. Section 2 summarizes previous
related work done in learning and Human-Computer Interaction (HCI) for AmI
environments. In Section 3 we explain the nature of the data collected. Section 4
explains the learning algorithm AP UBS and how patterns are represented through
LP UBS . Section 5 illustrates how the interaction system IP UBS can be used.
Section 6 explains our plans for future work and finally we provide our conclusion
in Section 7.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>Learning and Human-Computer Interaction have risen independently from AmI
environments. Here we analyze each area separately and in later sections we show
how they are amalgamated in our system to provide an essential feature of AmI
systems.</p>
      <p>
        Learning is a essential feature in any AmI system. However, given the
diversity of elements that need to converge in order to realize the infrastructure
needed for an AmI system, learning has not been devoted as much attention in
the literature as it may require. Some notable exceptions are listed next. The use
of Artificial Neural Networks [
        <xref ref-type="bibr" rid="ref15 ref17">15,17</xref>
        ] was the first serious approach in order to
infer rules for smart homes, and a survey of those works can be found in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Attempts made within MavHome project were aimed at predicting the next smart
home inhabitant action using pattern discovery and Markov model techniques [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
Jakkula and Cook [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] extend this work to predict actions using temporal
relations, defined by means of Allen’s temporal logic relations [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Other techniques,
such as Fuzzy-Logic in iDorm [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], Case-Based Reasoning in MyCampus [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] or
Decision Trees in SmartOffice [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] have been used. We can state that due to
specific characteristics of AmI environments, each problem favours the use of certain
techniques, but as Muller pointed out [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] ‘the overall dilemma remains: there
does not seem to be a system that learns quickly, is highly accurate, is nearly
domain independent, does this from few examples with literally no bias, and
delivers a user model that is understandable and contains breaking news about the
user’s characteristics’.
      </p>
      <p>
        Interaction systems have also been accepted as a essential feature of AmI
environments. The possibilities given by HCI systems in order to understand human
behavior has been widely analyzed [
        <xref ref-type="bibr" rid="ref10 ref22">10,22</xref>
        ]. One of the most active research groups
in HCI involving AmI environments is the Tampere Unit for Computer-Human
Interaction [
        <xref ref-type="bibr" rid="ref14 ref21">14,21</xref>
        ]. Focusing on speech interaction systems, there have been works
that emphasize the importance of sounds in environments where computers will
be “hidden" to the user making the system transparent and unobtrusive [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Collecting Data</title>
      <p>
        The process of learning patterns will be carried out based on information coming
from sensors in a way which is as unobtrusive as possible [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. Due to the fact
that different sensors provide different type of information, they will be used for
different purpose in the process of learning. Taking into account the nature of
the information provide by each sensor, three main different groups of sensors
are considered (although we are aware there are more types of sensors, e.g. alarm
pendants or RFID (Radio-frequency identification)):
• (type O) Sensors installed in objects; They provide direct information about
user actions, e.g. a sensor installed in a light switch indicates when the user
has switched that light on or off.
• (type C) Context sensors; They provide a continuous information about
the environment, e.g. a temperature sensor installed in a room will measure
room temperature continuously. Although user actions, e.g., changing the
setting of the thermostat, influence their future measurements they do not
provide direct information about user actions.
• (type M) Motion sensors; They indicates the location of the user at all
time, e.g. a motion sensor installed in the bedroom can help to infer (for
example in connection with an RFID sensor in the door) if the user is inside
the bedroom.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Learning and representing patterns of user behavior</title>
      <p>Once information coming from different sensors has been collected our learning
algorithm (AP UBS ) tries to discover possible relations among user actions
analyzing relations among sensors. Let us consider the situation described in figure 2,
assuming that usually:</p>
      <p>‘Motion Bedroom has been turned on and If Room Light Level is lower than
10 Then the Bedroom Lamp is turned on 2 seconds after’ (Pattern 1)</p>
      <p>AP UBS tries to discover this type of pattern where the bedroom lamp is
considered as main sensor triggering (mainSeT) and the Motion sensor that detects
when user goes into the bedroom will be considered as associated sensor triggering
(associatedSeT). Before explaining the process carried out by AP UBS to discover
these patterns, it is necessary to explain the language (LP UBS) used to represent
patterns as this language largely influence AP UBS as well as IP UBS.</p>
      <sec id="sec-4-1">
        <title>4.1. Representing patterns with LP UBS</title>
        <p>
          Defining a language that allows us to represent patterns of user behavior in AmI
environments is necessary to have a clear and non ambiguous representation (See
Appendix A and [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] for more details). The language integrated into our system,
LP UBS, is based on ECA (Event-Condition-Action) rules [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. ECA rules allow one
to define what action has to be carried out when a event occurs under relevant
conditions. Considering the pattern 1, it will be represented using LP UBS as:
ON occurs (Motion Bedroom, On,t0)
IF context (Room light level (&lt;,10))
THEN do (On, Bedroom Lamp, t) when t=t0+2s
        </p>
        <p>
          As well as providing a way of representing patterns in order to create a clear
and non ambiguous representation of patterns to be used by different modules, it
makes sure patterns are clearly specified and enables other technologies that can
check their integrity [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <sec id="sec-4-1-1">
          <title>4.1.1. Event Definition</title>
          <p>The event part defined by the ON clause defines the event(s) that occurred and
triggered the relation specified by the pattern. In the event definition, following
the terms used in AP UBS, the associatedSeT together with the action (on/off) is
defined. As patterns relate user behaviors, the ON event(s) will be the effect of
a user action over objects fitted with O-type sensors or the user’s presence being
detected by M-type sensors.</p>
        </sec>
        <sec id="sec-4-1-2">
          <title>4.1.2. Condition Definition</title>
          <p>The IF clause defines the necessary conditions under which the actions specified
in the THEN clause is the appropriate reaction to the occurrence of events listed
in the ON clause. Due to the fact that is almost impossible that event-action
relation is true under any condition, appropriate conditions are necessary in order
to represent accurate patterns. Below we provide some examples of conditions:
IF context (Living room temperature (&lt;,20 C)) (Condition 1)
IF context (Time of day (&gt;,20:30:00)) (Condition 2)
IF context (Time of day (&gt;,13:00:00)) &amp; context (Time of day (&lt;,14:15:00))
(Condition 3)
IF context (Day of week (=, Tuesday or Thursday)) (Condition 4)</p>
          <p>Conditions are defined using an attribute and a value. Attributes can be either
information coming from C-type sensors (light level in (Pattern 1); temperature in
(Condition 1)) or calendar information (time of day in (Condition 2)(Condition 3);
day of week in (Condition 4)). Values can be either qualitative (‘Tuesday’ and
‘Thursday’ in (Condition 4)) or quantitative (20 oC in (Condition 1); 20:30:00 in
(Condition 2)). It is possible to define a range of values ([13:00:00-14:15:00] in
(Condition 3)) when using quantitative values.</p>
        </sec>
        <sec id="sec-4-1-3">
          <title>4.1.3. Action Definition</title>
          <p>Finally, the THEN clause defines the action that user usually carries out given the
ON clause and given the IF conditions. As well as defining the mainSeT together
with the action (on/off), it defines the time relation between Event and Action
situations, being that relation either quantitative (Action 1) or qualitative (Action
2). The usefulness of each type of relation is different. Both define, although in
different ways, user behaviour, but whereas quantitative relations can be used to
automate mainSeT actions, qualitative relations cannot be used for this purpose
as besides knowing that one action follows another we need to know the specific
time relation.</p>
          <p>THEN do (On, Bedroom Lamp, t) when t=t0+2s (Action 1)
THEN do (On, Bedroom Lamp, t) when t is after t0 (Action 2)</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Learning temporal patterns with AP UBS</title>
        <p>In accordance with LP UBS , we have developed an algorithm (AP UBS) to discover
patterns in data collected by sensors. The algorithm is detailed below:
AP UBS Algorithm (for learning patterns)
for each sensor of type O (consider it as mainSeT )</p>
        <p>Identify the associatedSeT of type O or M (See Section 4.2.1)
for each associatedSeT</p>
        <p>Identify possible time relations (See Section 4.2.2)
if there exists a time relation then make it more accurate using
context information, i.e., by using sensors of type C (See Section 4.2.3)
Emphasising O-type sensors as mainSeT is due to the fact that those sensors
provide us direct information about users’ action so that discovering patterns
about them we will discover patterns about users’ actions. Next, the main three
steps applied for mainSeT are explained.</p>
        <sec id="sec-4-2-1">
          <title>4.2.1. Identifying associated sensor triggering</title>
          <p>Once information has been collected from sensors, the first step is to analyze the
possible related sensors (called associatedSeT ) to mainSeT in order to minimize
the complexity of next steps. For the purpose of discovering possible associatedSeT
we consider each event of mainSeT and collect the previous events that occurred
within the time period specified by window-width (defined manually).</p>
          <p>
            In order to get the list of possible associatedSeT s we use a similar approach
to the Apriori algorithm [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ] for mining association rules. The Apriori algorithm
tries to discover frequent sequences. Unlike the Apriori algorithm, in our case:
• The possible associations are limited to mainSeT.
• The result does not have a sense of sequence, but the pair
(mainSeT,associatedSeT ) is considered as sensors that can be potentially related
in a meaningful way. Besides, defining an associatedSeT does not mean
there will be a pattern that describes a relation mainSeT -associatedSeT,
but indicates there could potentially be one.
          </p>
          <p>As in every association mining process, minimum coverage and support values
must be provided manually.</p>
        </sec>
        <sec id="sec-4-2-2">
          <title>4.2.2. Identifying time relations</title>
          <p>The aim of this second step is to identify (if possible) the time relations among
mainSeT and the associatedSeT s discovered in the first step. Thus, for each
associatedSeT we collect the time distances between occurrences of mainSeT and
previous appearances of associatedSeT. Considering again the pattern (1), let us
imagine that the time distances between mainSeT (Bedroom Lamp) and
associatedSeT (Motion sensor that detects user goes into the bedroom) are depicted by
Figure 3.</p>
          <p>Taking as starting point these time distances {{e1,2s} {e2,1s} {e3,-} {e4,3s}
{e5,125s} {e6,2s}}, the next step is to make groups taking into account the
similarities among them and check if there is any time distance that groups enough
instances to consider it as interesting. The technique to make groups could be as
complex as we can imagine. In this case the technique we have used is based on
joining values that are within a range established by (1):
[min, max] = x ± (x ∗ tolerance)
where
x =</p>
          <p>(1)
Pn
i=1 ai
n
with: tolerance = tolerated deviation from x (%); ai = time distance of a element;
and n = number of elements</p>
          <p>Let us consider the time distances depicted in Figure 3 and a tolerance of 50%.
Grouping those values two groups are created, the first group with mean value
‘2s’, which covers 4 instances (e1,e2,e4,e6) and the second group with mean value
‘125s’ and 1 instance (e5). The group(s) that covers more instances than minimum
level demanded (defined manually, e.g. 25%) is considered as a pattern where
Event and Action parts are known. Considering the two groups generated in our
example, only the first group (with a confidence level of 4/6) will be considered
as pattern, generating a pattern like:
ON occurs (Motion Bedroom, On,t0)
IF [...]
THEN do (On, Bedroom Lamp, t) when t=t0+2s</p>
        </sec>
        <sec id="sec-4-2-3">
          <title>4.2.3. Identifying appropriate conditions</title>
          <p>In the previous step we have generated patterns relating two situations
(represented in ON and THEN clauses), but it is almost impossible to define patterns
associated to a specific object based on only one relation. For instance in our
example the defined pattern has a 4/6 confidence level so that it misclassifies 2/6
instances. Finding out (if possible) under what conditions a pattern appears or
not will be the last step in order to get accurate patterns. As has been mentioned
before, calendar and context information given by C-type sensors will be used to
define these possible conditions.</p>
          <p>For the purpose of discovering the conditions, two tables, covered and
noncovered tables, are generated. In the covered table there will be instances
classified well by the pattern together with the calendar and context information
collected when they happened, whereas the same information of instances where the
patterns fails is registered in the non-covered table (See Figure 4).</p>
          <p>Dividing both tables, using the information they contain, allows us to know
when the pattern defines properly the relation between mainSeT and
associatedSeT. Considering our example, the easiest way to separate covered and
noncovered tables (as the example contains few instances, it can be separated in many
different ways) seems to be by using the sensor bLight which indicates the light
level in the bedroom when action happens.</p>
          <p>Adding these conditions do not increase the number of instances the pattern
includes (it still includes the same number of instances, 4/6), but we make it more
accurate, making sure that it does not include instances that do not have that
pattern. Thus, in this step we will define the IF clause of the pattern, getting a
pattern like:
ON occurs (Motion Bedroom, On,t0)
IF context (Room light level (&lt;,10))
THEN do (On, Bedroom Lamp, t) when t=t0+2s</p>
          <p>
            The task of separating both tables has been considered as a classification
problem using the JRip algorithm [
            <xref ref-type="bibr" rid="ref24">24</xref>
            ] in order to do that. Even so, a modification
has to be made due to the fact that JRip provides rules with the only unique
objective of separating both classes (covered and non-covered), whereas in our
case it is desirable to obtain rules about the covered class. In this way we always
get a set of conditions that indicates when a pattern defines well the relation,
instead of a mix that indicates when it defines well and when it does not.
          </p>
        </sec>
        <sec id="sec-4-2-4">
          <title>4.3. Results</title>
          <p>
            In order to validate the algorithm we have applied it to artificial data generated
at the University of Ulster and then to a real dataset collected from MavPad, a
smart apartment created within the MavHome project [
            <xref ref-type="bibr" rid="ref25">25</xref>
            ]. The sensors installed
in MavPad are:
• 26 sensors on objects such as lamps, lights or outlets.
• 53 context sensors such as light, temperature or humidity.
• 37 motion sensors distributed in all the rooms.
25%
50%
75%
100%
16
5
1
0
12
3
1
0
33
14
3
0
20
10
6
0
15
2
4
0
          </p>
          <p>The dataset used to validate AP UBS was collected in three different time
periods and different experiments using different minimum confidence levels (25%,
50%, 75% and 100%) have been carried out. Table 1 summarizes the number of
patterns discovered in each trial, modifying the minimum confidence level. As well
as the number of discovered patterns, it shows the number of accurate patterns
(patterns where it has been possible to define conditions of occurrence).</p>
          <p>The results show us how difficult it is to discover patterns with 100%
confidence level, hence the importance of defining the right conditions. The results
show that it has been possible to define conditions in most of the patterns (76%
of the cases).
5. Interactive system (IP UBS )
Once patterns about user common behavior have been learned, they can be used
for different purposes. One exciting application is on to automation of devices
(e.g. turning on the bedroom light as pattern 1 shows), allowing environment to
act proactively. An ideal proactive environment suggests an environment where
the interaction (both process of data acquisition and process of getting feedback)
with the user is carried out through the normal operation of standard devices
such as switches or remote controls, trying to avoid any ‘ad hoc’ means.</p>
          <p>But apart from automating devices, discovered patterns can be used for other
purposes such as understanding user behavior or detecting hazardous or no normal
situations. Let us consider an old people’s home where their actions are monitored
and usual patterns are learned. Those patterns can be used by staff members
to understand the behavior of each patient or even to detect bad habits. It is
necessary a Human-Computer Interaction system that allows a friendly and easy
way of interaction, so that the learned patterns can be used efficiently and also
take maximum advantage of them.</p>
          <p>Even, considering patterns to automate devices and going beyond, a
HumanComputer Interaction system which involves patterns can be very useful in a
proactive environment in order to explain to the user (if required) why the
environment has acted in the way it has acted.</p>
          <p>Being aware of necessity of an interface in order to interact with PUBS, we
have developed a HCI system based on speech which based on LP UBS
representation allows user to interact with the patterns discovered by AP UBS .</p>
        </sec>
        <sec id="sec-4-2-5">
          <title>5.1. Interaction system’s functionalities</title>
          <p>As explained in Section 4, all patterns are represented based on LP UBS . This
makes the use of patterns easier, because every part of the pattern is well defined.
Our system can interact with the user by voice and to gather feedback about the
patterns that have been learnt and provide the user an opportunity to further
refine them. Next we illustrate the different functionalities of IP UBS , the
interaction module, through a few examples based on sessions collected through the
testing of our system.</p>
          <p>First of all, the system welcomes the user and then asks the user if he/she
wants to interact with IP UBS . If the user confirms the desire to interact with
IP UBS then the system asks to choose a mainSeT (it includes the possibility of
listening to all patterns of all sensors):</p>
        </sec>
        <sec id="sec-4-2-6">
          <title>System: Hello, welcome to the interaction system. Patterns have been discovered by the algorithm. Do you want to listen to them? (yes/no)</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>User: Yes</title>
      <sec id="sec-5-1">
        <title>User: Bedroom Lamp</title>
      </sec>
      <sec id="sec-5-2">
        <title>System: Please choose a main sensor. These are the possible main sensors:</title>
      </sec>
      <sec id="sec-5-3">
        <title>Bedroom Lamp, Bedroom Luxo Lamp, Motion Bedroom or All</title>
        <p>Once a mainSeT is chosen IP UBS lists patterns related to that mainSeT.
Every pattern is mentioned in order to get user’s feedback about it. The following
steps are carried out for each pattern. Let us consider pattern 1, shown in Section
4, as one of the patterns associated to Bedroom Lamp.</p>
      </sec>
      <sec id="sec-5-4">
        <title>System: Pattern 1</title>
      </sec>
      <sec id="sec-5-5">
        <title>System: Occurs Motion Bedroom is turned on and If Room Light Level is</title>
        <p>lower than 10 Then turn on the Bedroom Lamp 2 seconds after</p>
      </sec>
      <sec id="sec-5-6">
        <title>System: Do you want to accept, refine or delete it?</title>
      </sec>
      <sec id="sec-5-7">
        <title>User: Accept</title>
        <p>By means of IP UBS the user can accept, refine or delete a pattern. Accepting
a pattern means user accepts a pattern as useful and therefore the environment
will use it to act proactively in the future. If the user chooses to delete, that
pattern is removed from the set of patterns so that the environment will not use
it. Finally, a user can choose to refine a pattern if he/she considers it is a useful
pattern but some aspect needs tuning. In case of deleting or accepting operations,
the action to be carried out by IP UBS is simple, removing or not the pattern from
the set of patterns, but in case of refining IP UBS must guide the user through
the pattern in order to find out exactly what needs modification.</p>
      </sec>
      <sec id="sec-5-8">
        <title>System: Choose the part of the pattern you want to refine: Event, Condition or Action</title>
        <p>Following different samples of refinement are shown:</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Case 1 : Refining an Event part</title>
    </sec>
    <sec id="sec-7">
      <title>User: Event</title>
      <sec id="sec-7-1">
        <title>System: The Event part was: Occurs Motion Bedroom is turned on</title>
      </sec>
      <sec id="sec-7-2">
        <title>System: The device was ‘Motion Bedroom’. Do you want to modify it? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>User: no</title>
      <sec id="sec-8-1">
        <title>System: The action was ‘on’. Do you want to modify it? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>User: yes</title>
      <sec id="sec-9-1">
        <title>System: Possible action values are: ‘on’ or ‘off ’</title>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>User: off</title>
      <sec id="sec-10-1">
        <title>System: Do you want to confirm ‘off ’ as new action value? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-11">
      <title>User: yes</title>
    </sec>
    <sec id="sec-12">
      <title>Case 2 : Refining a Condition part</title>
      <sec id="sec-12-1">
        <title>User: Condition</title>
      </sec>
      <sec id="sec-12-2">
        <title>System: The Condition part was: If Room Light Level is lower than 10</title>
      </sec>
      <sec id="sec-12-3">
        <title>System: The attribute was ‘Room Light Level’. Do you want to modify it? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-13">
      <title>User: no</title>
      <sec id="sec-13-1">
        <title>System: The value was 10. Do you want to modify it? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-14">
      <title>User: yes</title>
      <sec id="sec-14-1">
        <title>System: Please, say the new value</title>
      </sec>
      <sec id="sec-14-2">
        <title>User: one five</title>
      </sec>
      <sec id="sec-14-3">
        <title>System: Do you want to confirm 15 as new value? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-15">
      <title>User: yes</title>
    </sec>
    <sec id="sec-16">
      <title>Case 3 : Refining an Action part</title>
      <sec id="sec-16-1">
        <title>User: Action</title>
      </sec>
      <sec id="sec-16-2">
        <title>System: The Action part was: Then turn on the Bedroom Lamp 2 seconds after</title>
      </sec>
      <sec id="sec-16-3">
        <title>System: The device was ‘Bedroom Lamp’. Do you want to change it?</title>
      </sec>
    </sec>
    <sec id="sec-17">
      <title>User: yes</title>
      <sec id="sec-17-1">
        <title>System: These are the possible devices: Bedroom Lamp, Bedroom Luxo Lamp or Motion Bedroom</title>
      </sec>
      <sec id="sec-17-2">
        <title>User: Bedroom Luxo Lamp</title>
      </sec>
      <sec id="sec-17-3">
        <title>System: Do you want to confirm ‘Bedroom Luxo Lamp’ as new device? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-18">
      <title>User: yes</title>
      <sec id="sec-18-1">
        <title>System: The action was ‘on’. Do you want to change it? (yes/no)</title>
      </sec>
      <sec id="sec-18-2">
        <title>System: The time relation was ‘2 seconds after’. Do you want to change it? (yes/no)</title>
      </sec>
    </sec>
    <sec id="sec-19">
      <title>User: no</title>
      <p>This Interaction system has been conceived to get user feedback and provide
the environment with a set of patterns that it can be safely used to act proactively.
Thus, accepted and modified patterns will be stored whereas deleted patterns will
not. It is worth mentioning that different environments and different aims make
necessary the development of different interaction systems. Let us imagine an old
people’s home where nurses must decide if patterns discovered on a monitored
elderly person are normal or are not. In this case the obtained feedback will not
be used to automate the environment, but it could be use to warn nurses if an
abnormal behavior is detected (for example, trying to go out of the house between
7pm and 7am).</p>
      <p>The speech-based interaction module of PUBS can be evolved in many
different ways to suit the needs of different users in different environments. Here we
have presented one application but we consider it can be adapted to other cases.</p>
      <sec id="sec-19-1">
        <title>5.2. Technical aspects</title>
        <p>IP UBS has been developed using a speech synthesizer and a speech recognizer.
In order to facilitate the integration with AP UBS (developed in Java), we have
chosen a synthesizer and recognizer written entirely in Java. The chosen speech
synthesizer has been FreeTTS 1.2 1 whereas Sphinx-4 2 has been the chosen speech
recognizer.</p>
        <p>Both FreeTTS and Sphinx make the interaction with the user easier providing
easy to use tools. Complications come mainly due to changing nature of AmI
environments. For example IP UBS cannot know beforehand what devices are in
the environment, so that grammars for the recognizer must be created and loaded
dynamically to tie the interaction module with a specific environment.</p>
      </sec>
    </sec>
    <sec id="sec-20">
      <title>6. Future Work</title>
      <p>We are currently improving different modules in PUBS. Thus, on the one hand,
our efforts will be aimed at improving the AP UBS so that it can cope well with
patterns LP UBS that have a qualitative component. Up to now AP UBS discovers
quantitative relations, so that our short-term efforts will be aimed at discovering
patterns with qualitative relations. Another level of complexity will be to target
the discovery of patterns involving the combination of more than two activated
sensors. Further future work will also include the possibility of incorporating more
complex information coming from devices such as PDAs.</p>
      <p>In relation to IP UBS our short-term efforts will be aimed at making it more
flexible, adding functionalities in order to allow user to add new patterns or to
interact using more natural (flexible and complex) expressions. Further future work
could also include a development of a general interaction system that, depending
on the environment and the type of user, interacts with him/her in different ways.</p>
    </sec>
    <sec id="sec-21">
      <title>7. Conclusions</title>
      <p>Ambient Intelligent environments need to know the user’s preferred and expected
behavior in order to meaningfully assist (for example by automating devices,
detecting hazardous situations, etc.). We have developed a system called Patterns
of User Behavior System (PUBS) which aims precisely at supporting an AmI
system in the task to acquire a notion of what is frequently the case in given
environment. This supports decision-making to help the user and also flexible and
continuous adaptation to the different behaviors we humans exhibit at different
times of the day, different days of the week, different seasons, etc.</p>
      <p>
        The fact that the environment is technologically rich must not translate into
any extra effort for the users to obtain the benefits of an AmI system [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. This
means the acquisition process must be done as unobtrusively as possible. PUBS’s
input information is gathered through sensors installed in the environment. The
algorithm (AP UBS ) discovers patterns defining temporal relations between
situations (detected through sensors) caused by the user. These patterns relate two
situations in terms of time and specify the necessary conditions where that
relation makes sense. Patterns discovered by AP UBS are stored using LP UBS , which
is a language we have defined to represent patterns in a univocal way.
      </p>
      <p>Discovering patterns is a essential part of a system to act intelligently but
taking into account the user is the focus of AmI environments, the interaction
module in between the user and PUBS is essential in order to ensure user satisfaction
with the patterns to be used by the AmI system. Thus, integrated within PUBS
there is a interaction system (IP UBS ) based on speech recognition by means of
which user can fine tune the discoveries of AP UBS .</p>
    </sec>
    <sec id="sec-22">
      <title>Acknowledgements</title>
      <p>Validation of the techniques presented in this paper were conducted over
artificial data generated at University of Ulster and environment data from
MavPad provided by Diane Cook from the University of Washington. Craig
Wootton and Michael McTear provided initial guidance on available technologies for
voice processing. This work was partially supported by Basque Government grant
PC2008-28B.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Srikant</surname>
          </string-name>
          .
          <article-title>Mining sequential patterns</article-title>
          .
          <source>In Pro. 11th International Conference on Data Engineering</source>
          , pages
          <fpage>3</fpage>
          -
          <lpage>14</lpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Allen</surname>
          </string-name>
          .
          <article-title>Towards a general theory of action and time</article-title>
          .
          <source>In Artificial Intelligence</source>
          , volume
          <volume>23</volume>
          , pages
          <fpage>123</fpage>
          -
          <lpage>154</lpage>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          .
          <source>Ambient Intelligence: the Confluence of Ubiquitous/Pervasive Computing and Artificial Intelligence</source>
          , pages
          <fpage>213</fpage>
          -
          <lpage>234</lpage>
          . Intelligent Computing Everywhere. Springer London,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          .
          <article-title>Ambient Intelligence: applications in society and opportunities for AI</article-title>
          .
          <source>20th International Joint Conference on Artificial Intelligence (IJCAI-07)</source>
          .
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>McCullagh</surname>
          </string-name>
          .
          <article-title>Ambient intelligence: Concepts and applications</article-title>
          .
          <source>In Computer Science and Information Systems</source>
          , volume
          <volume>4</volume>
          , pages
          <fpage>1</fpage>
          -
          <lpage>28</lpage>
          . ComSIS Consortium,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          and
          <string-name>
            <given-names>C. D.</given-names>
            <surname>Nugent</surname>
          </string-name>
          .
          <article-title>The use of temporal reasoning and management of complex events in smart homes</article-title>
          .
          <source>In Proccedings of European Conference on AI (ECAI 2004)</source>
          , pages
          <fpage>778</fpage>
          -
          <lpage>782</lpage>
          . IO Press,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Aztiria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Izaguirre</surname>
          </string-name>
          .
          <article-title>Spatial and temporal aspects for pattern representation and discovery in intelligent environments</article-title>
          .
          <source>In Workshop on Spatial and Temporal Reasoning at 18th European Conference on Artificial Intelligence (ECAI</source>
          <year>2008</year>
          )
          <article-title>(to be published</article-title>
          ),
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook and S. K. Das</surname>
          </string-name>
          .
          <source>Smart Environments: Technology, Protocols and Applications</source>
          . Wiley-Interscience,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Huber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Gopalratnam</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Youngblood</surname>
          </string-name>
          .
          <article-title>Learning to control a smart home environment</article-title>
          .
          <source>In Innovative Applications of Artificial Intelligence</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Alan</surname>
            <given-names>Dix</given-names>
          </string-name>
          , Janet Finlay, Gregory Abowd, and
          <string-name>
            <given-names>Russell</given-names>
            <surname>Beale</surname>
          </string-name>
          .
          <article-title>Human Computer Interaction</article-title>
          . Prentice Hall,
          <source>3rd edition</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>K.</given-names>
            <surname>Ducatel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Bogdanowicz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Scapolo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leijten</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Burgelman</surname>
          </string-name>
          .
          <article-title>Scenarios for ambient intelligence in 2010</article-title>
          .
          <source>Technical report</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C.</given-names>
            <surname>Le Gal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Martin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lux</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. L.</given-names>
            <surname>Crowley</surname>
          </string-name>
          . Smartoffice:
          <article-title>Design of an intelligent environment</article-title>
          .
          <source>IEEE Intelligent Systems</source>
          ,
          <volume>16</volume>
          (
          <issue>4</issue>
          ):
          <fpage>60</fpage>
          -
          <lpage>66</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>V. R.</given-names>
            <surname>Jakkula</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          .
          <article-title>Using temporal relations in smart environment data for activity prediction</article-title>
          .
          <source>In Proceedings of the 24th International Conference on Machine Learning</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kainulainen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Turunen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hakulinen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. P.</given-names>
            <surname>Salonen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Prusi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Helin</surname>
          </string-name>
          .
          <article-title>A speechbased and auditory ubiquitous office environment</article-title>
          .
          <source>In 10th International Conference on Speech and Computer (SPECOM)</source>
          , pages
          <fpage>231</fpage>
          -
          <lpage>234</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>M. C. Mozer</surname>
            ,
            <given-names>R. H.</given-names>
          </string-name>
          <string-name>
            <surname>Dodier</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Anderson</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Vidmar</surname>
            ,
            <given-names>R. F.</given-names>
          </string-name>
          <string-name>
            <surname>Cruickshank</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>The neural network house: an overview</article-title>
          , pages
          <fpage>371</fpage>
          -
          <lpage>380</lpage>
          .
          <article-title>Current trends in connectionism</article-title>
          .
          <source>Erlbaum</source>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>M. E.</given-names>
            <surname>Muller</surname>
          </string-name>
          .
          <article-title>Can user models be learned at all? Inherent problems in machine learning for user modelling</article-title>
          , pages
          <fpage>61</fpage>
          -
          <lpage>88</lpage>
          . Knowledge Engineering Review.
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>F.</given-names>
            <surname>Rivera-Illingworth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Callaghan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Hagras</surname>
          </string-name>
          .
          <article-title>A neural network agent based approach to activity detection in AmI environments</article-title>
          , pages
          <fpage>92</fpage>
          -
          <lpage>99</lpage>
          . IEEE International Workshop on Intelligent Environments.
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>D.</given-names>
            <surname>Rocchesso</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Bresin</surname>
          </string-name>
          .
          <article-title>Emerging Sounds for Disapearing Computers</article-title>
          , pages
          <fpage>233</fpage>
          -
          <lpage>255</lpage>
          . The Disapearing Computer. Springer-Verlag,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>U.</given-names>
            <surname>Rutishauser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Joller</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Douglas</surname>
          </string-name>
          .
          <article-title>Control and learning of ambience by an intelligent building</article-title>
          .
          <source>In IEEE on Systems, man and cybernetics: a special issue on ambient intelligence</source>
          , pages
          <fpage>121</fpage>
          -
          <lpage>132</lpage>
          .
          <source>IEEE Systems, Man, and Cybernetics Society</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>N. M.</given-names>
            <surname>Sadeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. L.</given-names>
            <surname>Gandom</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O. B.</given-names>
            <surname>Kwon</surname>
          </string-name>
          .
          <article-title>Ambient intelligence: The mycampus experience</article-title>
          .
          <source>Technical Report CMU-ISRI-05-123</source>
          , ISRI,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>E. P.</given-names>
            <surname>Salonen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Turunen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hakulinen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Helin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Prusi</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Kainulainen</surname>
          </string-name>
          .
          <article-title>Distributed dialogue management for smart terminal devices</article-title>
          .
          <source>In Interspeech</source>
          <year>2005</year>
          , pages
          <fpage>849</fpage>
          -
          <lpage>852</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Helen</surname>
            <given-names>Sharp</given-names>
          </string-name>
          , Yvonne Rogers, and
          <string-name>
            <given-names>Jenny</given-names>
            <surname>Preece</surname>
          </string-name>
          .
          <article-title>Interaction Design: Beyond Human Computer Interaction</article-title>
          . John Wiley and Sons Ltd.,
          <source>2nd edition</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>M.</given-names>
            <surname>Weiser</surname>
          </string-name>
          .
          <article-title>The computer for the 21st century</article-title>
          .
          <source>Scientific American</source>
          ,
          <volume>265</volume>
          (
          <issue>3</issue>
          ):
          <fpage>94</fpage>
          -
          <lpage>104</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>I. H.</given-names>
            <surname>Witten</surname>
          </string-name>
          and
          <string-name>
            <given-names>E.</given-names>
            <surname>Frank</surname>
          </string-name>
          .
          <source>Data Mining: Practical Machine Learning Tools and Techniques</source>
          , 2nd ed. Elsevier,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Youngblood</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L. B.</given-names>
            <surname>Holder</surname>
          </string-name>
          .
          <article-title>Managing adaptive versatile environments</article-title>
          .
          <source>In IEEE International Conference on Pervasive Computing and Communications</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          <article-title>Pattern::= ON (Event_Definition) IF (Condition_Definition) THEN (Action_Definition) Event_Definition::= Primitive_Event | Composite_Event Primitive_Event::= User_Presence|User_Action User_Presence::= user_is_at(Location) Location::= home|bedroom|living room|</article-title>
          ... User_
          <article-title>Action::= occurs(Device, Device_Action, time) Device::= device_1|device_2|</article-title>
          ...|device_n Device_Action::= on|off Composite_Event::= Primitive_Event &amp;...&amp;
          <string-name>
            <surname>Primitive</surname>
          </string-name>
          _Event
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>