<!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>Habits through Process Discovery</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Francesco Leotta</string-name>
          <email>leotta@diag.uniroma1.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Silvestro V. Veneruso</string-name>
          <email>veneruso@diag.uniroma1.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Ingegneria Informatica Automatica e Gestionale “A. Ruberti”</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Sapienza Università di Roma</institution>
          ,
          <addr-line>via Ariosto 25, Roma</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>discovery. Models usually employed for Ambient Intelligence (AmI) in smart homes are usually obtained directly from sensor logs composed by timestamped sequences of sensor measurements. Such approaches, still efective at diferent tasks, have the drawback of producing representations dificult to read and validate. In this paper we propose a tool, called Visual Process Maps (VPM), intended to allow the analysis of human routines at the human action level thanks to log preprocessing and the application of process Proceedings of the Demonstration &amp; Resources Track, Best BPM Dissertation Award, and Doctoral Consortium at BPM</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The term smart space refers to an environment enriched with a set of devices (e.g., sensors and
actuators) which aims at providing intelligent services to the human user, realizing the paradigm
known as ambient intelligence (AmI) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In order to provide people with these automatic or
semi-automatic utilities, an AmI system acquires data from the environment in the form of a
sensor log, i.e., a sequence of measurement values acquired from sensors.
      </p>
      <p>
        The literature in the area proposes several solutions to analyze sensor logs and to automatically
perform actions on the basis of the current context, user preferences and habits. All of these
approaches are based on models which describe the relationship between (i) the behavior of
a smart space’s inhabitant(s), (ii) the specific contextual state of the environment, and (iii) a
portion of sensor measurements from the log. Most of these techniques anyway, and especially
those based on machine learning techniques (the so called learning-based methods), only rely
on raw sensor measurements, whereas human actions are usually neglected, making it dificult
to visually inspect daily routines and habits [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Process Mining [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] combines data mining methods with techniques from the Business Process
Management (BPM) area [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In particular, it aims at extracting meaningful information from
event logs, i.e., sequences of readable human actions performed by user(s).
      </p>
      <p>Therefore, applying techniques from the BPM area can be a good compromise to overcome the
gap between raw sensor measurements and human actions. Due to the BPM’s input limitation,
a log-preprocessing step is required to infer human actions from the sensor log.</p>
      <p>In this paper we propose the Visual Process Maps (VPM) system, consisting of a complete
pipeline formed by (i) a tool for the visual analysis of sensor logs, (ii) a method to transform raw
movement measurements into actions, and (iii) a method to identify and visually analyze
precedence relationships between human actions. The tool and related resource can be downloaded
from https://www.diag.uniroma1.it/leotta/demos/vpm_bpm2021.html.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Relationship with the State of the Art</title>
      <p>VPM is a tool that allows to graphically represent log activations and then to extract habit
models out of them. The intended user of such a tool is a domain expert, who analyses the
activities in the environment (e.g., an house) and takes decisions about the design of the space
itself.</p>
      <p>The literature about representing models of human habits is wide. In this section, we will
highlight the diferences between our work and those representation tools available in literature,
which produce a human readable output that is easy to validate (once the representation is
known).</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the Context Modeling Language (CML) is presented. CML represents an initial approach
to provide a graphical representation to a formalism for situations and contexts. Derived from
software and databases design techniques, it introduces constructs to model typical smart spaces
issues, as missing and/or conflicting information, events dependencies and constraints.
      </p>
      <p>
        A survey about context modeling and reasoning techniques over contexts and situations is
provided in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. However, these works on context-awareness are focused on the representational
and reasoning issues; conversely they do not address the issue of learning the model from the
sensor logs. This is indeed the main contribution of our work, in which we revert to visual
process maps as representation for human habits.
      </p>
      <p>
        Recently, the BPM research community has applied process mining techniques to smart
spaces [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], authors propose both supervised and unsupervised techniques to fill the gap
between raw sensor measurements and human readable models (as discussed in Section 1),
to then apply an inductive miner and obtain a Petri-net, i.e., a graphical representation of an
obtained model characterized by nodes and arcs.
      </p>
      <p>
        These first attempts to apply techniques taken from the business process management were
focused on workflow specifications to anticipate user actions. A workflow is composed by a set of
tasks related by qualitative and/or quantitative time relationships. In [
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ], authors implemented
a system called “Sequential Patterns of User Behavior System” (SPUBS) to automatically retrieve
these workflows from sensor data.
      </p>
      <p>This category of workflow-based modeling techniques (like SPUBS) can, in the case of highly
variable processes, produce unreadable models; furthermore this approach requires the sensor
log to be already segmented before mining.</p>
      <p>With VPM, indeed, we decided to apply a specific technique named fuzzy mining that extracts
models, which are more suitable than workflows employed in SPUBS, to describe human habits
that are flexible by nature. As an advantage, this representation naturally supports visual
analytics.</p>
      <p>
        Finally, we want to mention Sitivus, a tool adopting visual analytics in smart spaces [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. In
Smart Environment
      </p>
      <p>Sensor Log</p>
      <p>Trajectory Visualization Tool</p>
      <p>Habit Extraction</p>
      <p>Extracted Models
their work, they remark the importance of providing domain experts with a tool allowing to
graphically inspect models of smart spaces. However, with respect to our work, sitivus is focused
on modeling and representing situations more than habits. A situation is an interpretation of
the context at a higher level and can comprehend the state of multiple users and consider the
activities that are executed by each of them (e.g., “users are having lunch”), while a habit is
focused on the routine of the user on specific time intervals (e.g., “what the user usually does
after work?”).</p>
    </sec>
    <sec id="sec-3">
      <title>3. Features Walkthrough</title>
      <sec id="sec-3-1">
        <title>3.1. Sensor Log conversion and Trajectory Visualization Tool</title>
        <p>
          As discussed in Section 1, in order to apply process mining techniques, the sensor log  must
be translated into a suitable event log ℰ. In this work, we adapted a portion of the TRACLUS
algorithm by [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] to perform this task.
        </p>
        <p>It considers the entire sensor data log as a single complex trajectory in which it can identify
several sub-trajectories, each one describing a portion (a sub-log) of the original sensor log,
which are related to the same action. This segmentation is based on finding the so called
“characteristic points”: points in which the trajectory’s behaviour changes rapidly. Finally, it
classifies each sub-trajectory by considering information about its movement and also which
are the sensors involved and for how long, and labels them with an action (MOVEMENT, AREA
or STAY), and their relative location inside the smart environment (e.g., &lt;STAY Kitchen_table&gt;).
Now the log can be visually analysed by a human domain expert, who could be interested in
replaying the log (or a portion of it) by employing the trajectory visualization tool (see Figure 2).
Furthermore, it can now be processed through process mining techniques.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Habit Extraction</title>
        <p>The event log, obtained from the previous step (Section 3.1), is fed into the fuzzy miner. The
fuzzy miner produces a directed graph where each node represents a task (or in our case a human
action) and each arc represents a precedence constraint between an action and its successor.
Nodes and arcs are weighted, respectively with the number of times an action appears in the
log and the number of times that an action follows another in the log.</p>
        <p>These information are used to extract frequent sequences of human actions (i.e., paths inside
the graph), by using an entire day as time reference.</p>
        <p>Finally, we merge all these sequences into single activity models. As this approach was
evaluated on the partially labeled Aruba dataset, we had at our disposal a ground truth consisting
of sequences labeled with the name of the activity (e.g., Relax, Eating, Sleeping, and others). All
frequent sequences extracted were compared with these labeled “ground truth” sequences, by
computing the Jaccard coeficient : each sequence is then assigned to the activity label of the
ground truth sequence obtaining the maximum score. As a final step, the sequences belonging to
the same activity, are combined together: a graph for each activity class, that is also a subgraph
of the original graph. The results obtained are very interesting, as the segments extracted are
representative of the activity performed.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Discussion</title>
      <p>This paper introduces VPM, a tool for the automated analysis of smart home sensor logs through
process discovery.</p>
      <p>At the current stage, the proposed graphical representation and, as consequence, models
produced by the tool are limited by the type of sensors considered during the analysis. At
the current stage, only PIR sensors have been considered; this does not allow to understand
precisely the action performed by the user, but only the usage of a device. Supporting other
types of sensors, would led to better classify actions and to more readable and accurate models,
thus allowing a greater precision of the whole approach. Extending the analysis to other types
of sensors will be an important starting point for our future work.</p>
      <p>In addition, the employment of the tool in a real scenario would require also automatic
segmentation techniques in order to describe human routines at a level of granularity finer than
an entire day.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>M.-R. Tazari</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Furfari</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Fides-Valero</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Hanke</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Höftberger</surname>
            ,
            <given-names>D. D.</given-names>
          </string-name>
          <string-name>
            <surname>Kehagias</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Mosmondor</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Wichert</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Wolf</surname>
          </string-name>
          ,
          <article-title>The universaal reference model for aal</article-title>
          .,
          <source>Handbook of Ambient Assisted Living</source>
          <volume>11</volume>
          (
          <year>2012</year>
          )
          <fpage>610</fpage>
          -
          <lpage>625</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>F.</given-names>
            <surname>Leotta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mecella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mendling</surname>
          </string-name>
          ,
          <article-title>Applying process mining to smart spaces: Perspectives and research challenges</article-title>
          ,
          <source>in: International conference on advanced information systems engineering</source>
          , Springer,
          <year>2015</year>
          , pp.
          <fpage>298</fpage>
          -
          <lpage>304</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>W. M. P. van der Aalst</surname>
          </string-name>
          ,
          <source>Process Mining: Data Science in Action</source>
          , 2 ed., Springer,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Dumas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. La</given-names>
            <surname>Rosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mendling</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. A.</given-names>
            <surname>Reijers</surname>
          </string-name>
          ,
          <source>Fundamentals of Business Process Management (2nd ed.)</source>
          , Springer,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>K.</given-names>
            <surname>Henricksen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Indulska</surname>
          </string-name>
          ,
          <article-title>Developing context-aware pervasive computing applications: Models and approach</article-title>
          ,
          <source>Pervasive and mobile computing 2</source>
          (
          <year>2006</year>
          )
          <fpage>37</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Bettini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Brdiczka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Henricksen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Indulska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nicklas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ranganathan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Riboni</surname>
          </string-name>
          ,
          <article-title>A survey of context modelling and reasoning techniques</article-title>
          ,
          <source>Pervasive and Mobile Computing</source>
          <volume>6</volume>
          (
          <year>2010</year>
          )
          <fpage>161</fpage>
          -
          <lpage>180</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>N.</given-names>
            <surname>Tax</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Sidorova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Haakma</surname>
          </string-name>
          , W. M. van der Aalst,
          <article-title>Event abstraction for process mining using supervised learning techniques</article-title>
          ,
          <source>in: Proceedings of SAI Intelligent Systems Conference</source>
          , Springer,
          <year>2016</year>
          , pp.
          <fpage>251</fpage>
          -
          <lpage>269</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Aztiria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Izaguirre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Basagoiti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          ,
          <article-title>Discovering frequent sets of actions in intelligent environments</article-title>
          ., in: Intelligent Environments, iOS Press,
          <year>2009</year>
          , pp.
          <fpage>153</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Aztiria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Izaguirre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Basagoiti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Augusto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Cook</surname>
          </string-name>
          ,
          <article-title>Automatic modeling of frequent user behaviours in intelligent environments</article-title>
          ,
          <source>in: Intelligent Environments (IE)</source>
          ,
          <source>2010 Sixth International Conference on, IEEE</source>
          ,
          <year>2010</year>
          , pp.
          <fpage>7</fpage>
          -
          <lpage>12</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>A. K. Clear</surname>
            , T. Holland,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Dobson</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Quigley</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Shannon</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Nixon</surname>
          </string-name>
          ,
          <article-title>Situvis: A sensor data analysis and abstraction tool for pervasive computing systems</article-title>
          ,
          <source>Pervasive and Mobile Computing</source>
          <volume>6</volume>
          (
          <year>2010</year>
          )
          <fpage>575</fpage>
          -
          <lpage>589</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>C. W.</given-names>
            <surname>Günther</surname>
          </string-name>
          ,
          <string-name>
            <surname>W. M. Van Der Aalst</surname>
          </string-name>
          ,
          <article-title>Fuzzy mining-adaptive process simplification based on multi-perspective metrics</article-title>
          ,
          <source>in: International conference on business process management</source>
          , Springer,
          <year>2007</year>
          , pp.
          <fpage>328</fpage>
          -
          <lpage>343</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          ,
          <article-title>Learning setting-generalized activity models for smart spaces</article-title>
          ,
          <source>IEEE intelligent systems 27</source>
          (
          <year>2012</year>
          )
          <fpage>32</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J.-G.</given-names>
            <surname>Lee</surname>
          </string-name>
          , J. Han, K.-Y. Whang,
          <article-title>Trajectory clustering: a partition-and-group framework</article-title>
          ,
          <source>in: Proceedings of the 2007 ACM SIGMOD international conference on Management of data</source>
          ,
          <year>2007</year>
          , pp.
          <fpage>593</fpage>
          -
          <lpage>604</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>