<!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>
      <journal-title-group>
        <journal-title>in: Journal of Physics: Conference Series</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1109/ICUMT57764.2022.9943410</article-id>
      <title-group>
        <article-title>Automatic And Non-Invasive Analysis Of Behavioural Routines Using BLE Technology</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Javier Gaviña Rueda</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Raúl Montoliu Colás</string-name>
          <email>montoliu@uji.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Emilio Sansano-Sansano</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marina Martínez-García</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergio Lluva Plaza</string-name>
          <email>sergio.lluva@uah.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ana Jiménez Martín</string-name>
          <email>ana.jimenez@uah.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>José M. Villadangos</string-name>
          <email>jm.villadangos@uah.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Juan Jesús García Domínguez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universidad Alcalá de Henares (UAH University) Pza. San Diego</institution>
          ,
          <addr-line>s/n, Alcalá de Henares (Madrid), 28801</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universitat Jaume I(UJI University)</institution>
          ,
          <addr-line>Avinguda de Vicent Sos Baynat, s/n, Castellón de la Plana, 12006</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>1255</volume>
      <fpage>50</fpage>
      <lpage>55</lpage>
      <abstract>
        <p>Monitoring the activities and routines of the elderly requires continuous work and efort on the part of the care staf. It is vital to follow up on each user since abnormal behaviour could reveal the presence of a medical condition and, in these cases, early intervention is of utmost importance. In this paper, we deploy a room-level symbolic location system based on Bluetooth Low Energy (BLE) technology and present the results obtained from applying several methods capable of determining daily and weekly habits, non-invasive, using association rules and decision trees.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Sensor networks</kwd>
        <kwd>People Monitoring</kwd>
        <kwd>Indoor localisation</kwd>
        <kwd>Association rules</kwd>
        <kwd>Decision trees</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Acknowledgments</title>
      <p>PID2021-122642OBPID2021-122642OB</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>
        In today’s age of technology, monitoring and tracking users’ daily behaviours and activities
are of great importance for medical professionals and care staf. In particular, monitoring the
habits of the elderly is crucial to identify any changes in their behaviour and prevent possible
diseases [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Location-based services (LBS, Location Based Systems) have undergone great
development in recent decades [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Typically, researchers apply methods based on proximity or
ifngerprinting techniques [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to estimate the position, either based on a coordinate system or
symbolically (room, area, etc.). For this purpose, there are a number of technologies based on
the deployment of radio frequency devices (Bluetooth, Wi-Fi, RFID, etc.), either transmitting or
receiving beacons, located in known positions.
      </p>
      <p>This work introduces a novel approach focused on this methodology using association rules
and decision trees that allow an automatic and non-invasive determination of the daily and
weekly habits of each user. In this study, a set of emitting beacons using BLE technology is
used, distributed in the diferent rooms where the presence of people needs to be detected.
Subsequently, localisation algorithms are used to obtain the symbolic location of the participants.
The information obtained is acquired through the smart watches worn by the participants in
this trial.</p>
      <p>
        To evaluate the proposal presented in this work, we use data from a nursing home, where a
set of residents wore a smartwatch throughout the study[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The results obtained demonstrate
that by using the proposed methods, it is possible to determine the daily and weekly habits of
the users in an accurate and non-invasive way, which can help prevent diseases and improve
the quality of life of the elderly.
      </p>
      <p>The rest of the article is organised as follows: Section II provides an exploration of the prior
research and related work; Section III presents the methods used in this work and the proposed
methodology; Section IV deals with the data used, the experimental phase and the results
obtained; finally, Section V describes the conclusions reached and future research lines.</p>
    </sec>
    <sec id="sec-3">
      <title>2. Related Work</title>
      <p>
        Numerous works and approaches have utilized BLE (Bluetooth Low Energy) for various
applications, such as signal intensity monitoring [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], trajectory analysis in cultural sites [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], digital
contact tracing [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and detection of routine changes [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The authors in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] introduce a
costefective BLE-based sensor platform for eficient Received Signal Strength (RSS) monitoring.
During performance testing, the platform exhibited high precision, with an average localization
error of 0.8 meters. Moreover, the battery-powered devices demonstrated remarkably low energy
consumption, totaling less than 0.2 W, making it significantly more eficient than comparable
Wi-Fi CSI-based setups. Notably, the platform’s design allows implementation across a wide
range of BLE SoCs available in the market, rendering it an attractive cost-efective option.
      </p>
      <p>
        Regarding the work presented in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], it consists on an intensive study on visitor trajectory
analysis in cultural sites. To achieve this, the authors employ low-cost BLE beacons for indoor
positioning, enabling precise user localization in a 2D Cartesian space. Leveraging a data-driven
modeling approach, a set of Fuzzy Rule Classifiers (FRC) is generated for indoor trajectories in
cultural sites. However, although the study focuses on analyzing various types of trajectories in
these venues, it does not delve into daily routines or room-level routines.
      </p>
      <p>
        On the other hand, the authors in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] propose an interdisciplinary approach to comprehend the
epidemiological, social, and technical aspects of digital contact tracing solutions for combating
the COVID-19 pandemic. Utilizing BLE as the technology for digital contact tracing, the work
capitalizes on its prevalence in mobile phones and its ability to provide proximity detection
signals both indoors and outdoors, with relatively consistent distance estimation. Digital contact
tracing is employed to identify and notify individuals who have had close contact with someone
who tested positive for COVID-19, enabling them to take preventive measures.
      </p>
      <p>
        Finally, in the work presented in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], a BLE-based approach is proposed for detecting changes
in daily routines in a controlled environment. It utilizes the 105 iBKS model and iBKS PLUS as
transmitter beacons and the BQ Aquarius Plus as the receiving node. The system estimates the
symbolic user’s location and detects routine changes based on the average time spent in each
room. Furthermore, they define a routine day when the reproducibility coeficient is below 9,
corresponding to a 15% deviation of total time spent in each room. Although this approach
shows promise as an initial version for detecting routine changes, its analysis is simplified to a
single parameter and does not provide an easily interpretable descriptive method for routines,
nor does it determine routines based on specific days of the week.
      </p>
      <p>Our proposed approach leverages BLE technology to estimate room-level positions of elderly
individuals residing in a nursing home. The primary goal is to discern and illustrate
weeklylevel routines in a more intelligible and visually descriptive manner, employing logical rules or
ifrst-order axioms. To achieve this, we utilize association rule algorithms such as Apriori and
decision trees to generate these descriptive rules</p>
    </sec>
    <sec id="sec-4">
      <title>3. Methods</title>
      <sec id="sec-4-1">
        <title>3.1. Technology</title>
        <p>
          This project was initiated in the year 2020 within the following publication [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. To facilitate the
monitoring of the elderly, Bluetooth technology was selected as the preferred option. To achieve
this objective, the beacon model 105 of the company iSBK [10] was employed. As depicted in the
Figure 1, it has a small size, so it allows to be displayed in various locations in the environment.
The elderly were equipped with a Sony smartwatch 3 model, running Android Wear 6.0.1. The
ifrmware of the smartwatch has been customized to support an application that consistently
scans at the highest permissible sampling rate dictated by the operating system. The collected
information is stored on a microSD card. The estimated battery life ranges from 10 to 12 hours.
        </p>
        <p>The foremost advantages of utilizing BLE technology over WiFi are as follows:
1. Enhanced battery life: BLE technology ofers superior battery longevity compared
to WiFi, with an approximate duration of 2-3 months before requiring a recharge or
replacement.
2. Flexible beacon placement: Unlike WiFi routers, BLE beacons can be positioned freely
without restrictions, allowing for more versatile and adaptable deployment options
In our approach, we employ a passive beacon methodology wherein the smartwatch
autonomously captures the Received Signal Strength Indication (RSSI) of the beacons</p>
      </sec>
      <sec id="sec-4-2">
        <title>3.2. Indoor Positioning</title>
        <p>Some indoor positioning algorithms aim at obtaining the symbolic location of a subject in an
indoor space. In this work, a localisation method based on fingerprinting techniques is used,
which is explained below. First of all, it is necessary to create the radio map  = {ℱ , ℒ} which
consists of capturing, at diferent indoor positions, the received signal strength (RSSI) by each
beacon available in the environment. In our case, the beacons are BLE. The set ℱ is defined as
follows:
ℱ = { 1,  2, . . . ,  }
(1)</p>
        <p>This set is composed of  vectors or fingerprints, stored as vectors of RSSI measurements
(  = { 1,,  2,, . . . ,  ,},  ∈ [1, ]), where  represents the number of beacons used in the
experiment, and  , represents the RSSI measurement of beacon  associated with sample .
On the other hand, there exists the set of ℒ annotations, which consists of an -dimensional
vector associating each fingerprint to a location. We define it as:</p>
        <p>ℒ = { 1,  2, . . . ,  }</p>
        <p>The main objective of the positioning is to estimate the location of a user using the  radio
map as a training database. For this purpose, it is very common to use the -NN algorithm which,
in its most elementary version, given a test fingerprint, obtains the  most similar fingerprints,
based on a distance function, among those included in the  radio map and estimates the user’s
location ( ) as the centroid of the locations associated to the closest fingerprints.
(2)</p>
      </sec>
      <sec id="sec-4-3">
        <title>3.3. Association Rules</title>
        <p>Association rules is an artificial intelligence technique widely used in Data Mining, which
consists of detecting and extracting intrinsic structures or patterns in the data, in an unsupervised
way, by generating first-order logic. The rules are of the form {1, 2, 3, . . . , } Z⇒ ,
where each rule has an antecedent and a consequent. The antecedent consists of a series of
predicates that are disjunctively interpreted: 1 ∧ 2 ∧ 3 . . . ∧ . On the other hand, the
consequent is the predicate that is concluded when the antecedent is true.</p>
      </sec>
      <sec id="sec-4-4">
        <title>3.4. Decision Trees</title>
        <p>A decision tree is a predictive model, quite well known within the field of machine learning,
which consists in performing a series of divisions of the data, based on a measure of impurity
[11]. It aims to generate a tree-like structure, where the nodes are partitions of the data, and
the branches are the rules that are applied to split the data. The potential of the decision tree
lies in the interpretation of the results. This allows, within the field of data mining, to detect
intrinsic data patterns.</p>
      </sec>
      <sec id="sec-4-5">
        <title>3.5. Proposed Methodology</title>
        <p>Figure 2 shows a schematic of our proposal to obtain a set of rules to define the behaviour of
users during their daily life in the nursing home. The diferent elements are explained below.</p>
        <sec id="sec-4-5-1">
          <title>3.5.1. Localization</title>
          <p>Given a user, and from the RSSI measurements obtained during the data collection campaign,
we obtain one fingerprint per minute. The set of all test fingerprints is denoted by ℱ . The
objective is to obtain, for each fingerprint, the location of the user (symbolic in our case), i.e.
the set ℒ^ . For this purpose, the -NN algorithm with  = 1 has been used. By means of the
above process, we obtain the user’s location in each of the 1440 minutes of the day.</p>
          <p>We call the above data Labelmap  and it can be expressed as shown below:
 = { 1,  2, . . . ,  }</p>
          <p>Where d is the total number of days on which data has been collected from a user and   is
a vector of 1440 location annotations estimated ( 1^,) on a given day such that:
  = {^1,, . . . , ^,},  ∈ [1, ],  = 1440</p>
        </sec>
        <sec id="sec-4-5-2">
          <title>3.5.2. Features extraction</title>
          <p>Once the Labelmap set ( ) is defined, feature extraction is applied by partitioning temporary
windows according to the chosen requirements. For each partition, the number of occurrences
of each symbolic location for each   is counted.</p>
          <p>(0,1) is an occurrence function such that:
• (0, 1) is the time interval (in minutes of the day) at which we calculate the occurrence
of a symbolic location.</p>
          <p>,
• (0,1) the number of minutes the user is in room , on day , for the time window (0, 1).
•  is the number of diferent locations in this study.</p>
          <p>The dataset resulting from feature extraction, , can be obtained as follows:
where:
(3)
(4)
(5)
(6)
(0,1) :   → {(,01,1), (,02,1), . . . , (0,1), . . . , (0,1)}</p>
          <p>
            , ,
∀0,1 ∈ [
            <xref ref-type="bibr" rid="ref1">1, 1440</xref>
            ], 1 &gt; 0,  ∈ [1, ],  ∈ [1, ]
          </p>
          <p>= ⋃=︁1  = ⋃=︁1 (0 ,1 )( ) =
{(,101,11), (,102,11), . . . , (,10,11), (,201,21), (,202,21), . . . , (,20,21),</p>
          <p>
            ,1 ,2 ,
. . . , (0,1), (0,1), . . . , (0,1)}
{∀0,1 ∈ [
            <xref ref-type="bibr" rid="ref1">1, 1440</xref>
            ], ∀ ∈ [1, ] ⃒⃒ 1 &gt; 0 , 0+1 &gt; 1 }
 ∈ [1, ],   ⊆ 
•  ∈ [1, ] corresponds to temporary partition  over  total partitions.
• (0 , 1 ) is the time interval in which we calculate the occurrence of a symbolic location in
the time partition .
• ( 1
          </p>
          <p>0, ) (see Eq. 5) is the occurrence function in time partition .</p>
          <p>• (,0,1 ) is the total number of minutes in which the user is in the room.</p>
          <p>Finally, we discretise the set  by applying the following:
(′0,,1 ) =
{︃1   ,</p>
          <p>(0 ,1 ) ≥ 
0  ℎ</p>
          <p>With  as the threshold time, in minutes, for which we consider whether a subject is at a
location. We apply this discretisation to the set  and obtain a data set ′ . This set contains 
rows, where each row ′ is a vector of size  as described by the equation (8).</p>
          <p>Where:
′ = {(10,11), (10,11), . . . , (′10,,11),
′,1 ′,2
′,1 ′,2 ′,
. . . , (0,1), (0,1), . . . , (0,1)}
 ∈ [1, ],  ∈ [1, ],  ∈ [1, ],  ′,
(0 ,1 ) ∈ {0, 1}
(7)
(8)
(9)
• ′ ∈ R x  is the dataset resulting from  feature extraction (see Eq. 6) and
discretisation (see Eq. 7), with  rows and  columns.
•  number of partitions.
• (′0,,1 ) is a dichotomous variable indicating whether on day , in the time interval (0 , 1 ),
the user is in room , (′0,,1 ) = 1, or he/she is not, (′0,,1 ) = 0.</p>
          <p>Finally, we obtain the annotated feature extraction set , where for each day  we have
annotated the corresponding day of the week  ∈ :
′
 = { , }
Being  ∈ {Monday, Tuesday, . . . , Sunday}, a vector of annotations of dimension Rx1.</p>
          <p>The dataset obtained with the extraction of annotated features  is the one we will use to
extract the association rules later on.</p>
        </sec>
        <sec id="sec-4-5-3">
          <title>3.5.3. Set of Transactions</title>
          <p>In order to use the association rule algorithm, a priori, we have to transform  (see Eq. 9) into a
set of ℳ transactions. For this, we define ℐ as the set of  distinct attributes (or items) and 
as the transactions containing a set of ℐ items, such that  ⊆ ℐ [12]. We define ℳ to be the
set of all transactions  such that:
ℳ = {1, 2, . . . , }
(10)</p>
          <p>We apply a transformation to obtain the set of itemsets ℐ. Each row of  is represented by a
vector of size  + 1, where each attribute is a dichotomous variable (′0 ,1 ) ∈ {0, 1} indicating
presence in a room, and  (day of the week) is a categorical variable of seven possible values.
For each dichotomous variable, two items (dichotomous complementary attributes)(′0 ,1 ) →
{1, 2} are generated. The transformation generates the vector of attributes that compose the
itemset ℐ ∈ R2+7, a set of 2 + 7 items that represent all the possible combinations that a
user can make in a transaction.</p>
          <p>Finally, each transaction  ⊆ ℐ is a set of items observed on day . If we put all the
transactions together we obtain the set ℳ that we can see represented in Table 1.</p>
        </sec>
        <sec id="sec-4-5-4">
          <title>3.5.4. Rule extraction file</title>
          <p>For automatic pattern determination, a rule-based descriptive method is used. To describe a
subject, we have to obtain the rule extraction file ℛ = {1, 2, . . . , }, in which each rule 
has the form shown in equation (11).</p>
          <p>1 : {1, 2, . . . , } Z⇒</p>
          <p>There are three metrics used in data mining to evaluate the performance of a rule extracted
from data:
• Support. Proportion of transactions containing  ∪  versus the total number of
transactions: |∪|</p>
          <p>|ℳ|
• Confidence . Proportion of transactions containing  ∪  against the support of the
antecedent: |∪|</p>
          <p>||
• Lift [13]. It measures the distance between the observed and expected support under the
(∪)
assumption of independence between the elements: ()· ()</p>
          <p>For the automatic extraction of rules we have considered two alternatives. The first one
consists of using a priori association rule algorithms. The second one consists in training a
decision tree and, with the partitions made by the tree, converting them into rules and calculating
the three metrics mentioned above.
(11)</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Experiments and Results</title>
      <p>4.1. Data
In order to evaluate the proposal presented in this paper, the sixth campaign of the database
published in [14] has been used. During this campaign, six volunteers were provided with a
smartwatch. These volunteers were required to wear the watch at all times, except when the
watch was removed by the care staf to be recharged (usually before going to bed). During the
day the watch is continuously acquiring the RSSI of the diferent beacons deployed throughout
the nursing home as shown in Figure 3. This campaign lasted 8 weeks.</p>
      <sec id="sec-5-1">
        <title>4.2. Experiments</title>
        <p>To adjust the hyperparameter  of the -NN algorithm, we used a validation set included in the
database [14] in which a set of fingerprints was obtained in each of the locations included in
the nursing home (room, dining room, gym,...). By means of cross-validation, the performance
of the -NN algorithm was evaluated for diferent values of , being  = 1 the value for which
the best result was obtained, where the accuracy of the classifier, for the validation set, is found
to be very high (100%).</p>
        <p>It is with this trained model that we will obtain all the symbolic annotations of the users
of the residence in order to obtain the labelmap  shown in Figure 4. As this figure shows, it
can be seen that practically all users go to the dining room (orange colour) at the same time.
However, the activities before or after the meals vary greatly between users.</p>
        <p>After obtaining  , we divide the time windows into two partitions: morning (9:00-13:30) and
afternoon (13:31-16:50). To do so, we use the values shown in Table 2.</p>
        <p>We apply these values to the occurrence function (
0, ) (see Eq. 5) and obtain the feature
1
extraction file . Finally, we discretise it with  = 5 minutes, join it to the weekly annotations
 and obtain the discretised and annotated feature extraction file .</p>
        <p>The next stage is the clustering of locations with similar activities and at a close distance, to
define three groups:
• Physical activity: Gym, corridor, therapy room.
• Passive activity: TV room, terrace.</p>
        <p>• Room: Room.</p>
        <p>In this work, we have excluded the locations living room and dining room as we want to focus
on the activities they carry out in the morning (before lunch) and in the afternoon.</p>
        <p>One way to visualise volunteers’ routines is by using frequency tables. If we group by day of
the week, we can observe for a specific volunteer, the percentage of times that on a Monday, for
example, they are in the room, doing some kind of physical activity or doing a passive activity.
Similarly, we can determine for the entire campaign, the percentage of times that each volunteer
has been found doing each of the activities. In this way, we can determine which volunteers are
more similar or if any volunteer has unusual behaviour.</p>
        <p>We have applied the a priori algorithm with the package arules in R [15]. For this problem,
we start with transaction data. The first step is to extract daily rules and remove them and then
extract weekly rules. To do the former, we use a function itemFrequency, which returns the
individual support of each item belonging to ℐ, and we eliminate the items whose support is
higher than a certain threshold which, in our case, we have set at 90%.</p>
        <p>For the rule generation with a priori we have defined the following parameters:
• maxlen = 4 → The number of items making up the antecedent does not exceed four
• support = 1e-5 → Minimum support to generate the rule
• confidence = 1e-5 → Minimum confidence to generate the rule</p>
        <p>For the decision trees, we have used the rpart and tidyrules libraries to train the tree and
extract association rules from the discretised and annotated dataset. First, we extract the daily
rules with itemFrequency and then we fit a decision tree for each subject using the CART
algorithm [16] with a maximum depth of 3 and a minimum of 4 samples per node. Finally, we
extract rules from the tree and obtain the metrics with tidyRules. In our case, we have limited the
depth of the tree to maintain interpretation without having an excessive number of antecedents
in a rule.</p>
      </sec>
      <sec id="sec-5-2">
        <title>4.3. Results</title>
        <p>To determine the accuracy of the algorithms used for automatic rule extraction, we have an
annotation file in which the care staf detailed the daily and weekly behaviours of each of
the participants in the study. In this way, we can extract rules and check whether there is
a contradiction with those noted in the file. In this case, we will perform this analysis with
user 9FE9 from campaign 6. The rules provided by the care staf that we can extract from the
annotation file are the following:
• Every day
– In the morning: the volunteer does physical activity.
– In the afternoon: the volunteer usually does physical or passive activities and goes
to his/her room when finished.
• Tuesdays: the volunteer does physical or passive activity in the morning.
• Twice a week: the volunteer spends the whole morning doing physical activity.</p>
        <p>To find patterns, we first use a daily frequency table (see Table 3). From user 52EA we noticed
that he/she does not do physical activity and he/she is not in leisure areas, spending most of the
time in his/her room. In contrast, user 9FE9 is physically active and is usually found engaging
in passive activities during the afternoon, such as spending time on the terrace or watching
TV. We also use a weekly frequency table (see Table 4) to see which activities are performed on
each day of the week. From user 02A8, we can see that he/she engages in less physical activity
on Thursdays and spends most of his/her time doing passive activities on Tuesday afternoons.
On the other hand, user 9FE9 is not usually in his/her room on Thursdays and Fridays. Instead,
he/she is frequently found doing some physical activity or any other type of activity.</p>
        <p>Whether we use an association rules algorithm or decision trees, we have first obtained the
absolute rules with the itemFrequency. In the case of volunteer 9FE9, we extract as a daily rule
PhysicalMorning = 1, as we can see in Figure 5. This rule agrees with the annotations provided by
the care staf.</p>
        <p>The next step is to apply the a priori algorithm and a decision tree to volunteer 9FE9. First, we
remove the PhysicalMorning attribute, the daily rule obtained with itemFrequency, and we obtain
a weekly rule set of 315 rules with a priori. We select the seven best rules according to the gain
and obtain the seven strongest rules that we see in Table 5. Finally, we train a decision tree, as
we see in Figure 6 and extract its weekly rules with tidyRules and obtain a set of 5 weekly rules.
Table 6 shows these rules.
1: {Passivemorning=0, Physicalafternoon =0} Z⇒
2: {Passivemorning=1, Roommorning=1} Z⇒
3: {Passivemorning=0, Physicalafternoon =1, Passiveafternoon =0} Z⇒
4: {Passivemorning=1, Roommorning=0} Z⇒
5: {Passivemorning=0, Physicalafternoon =1, Passiveafternoon =1} Z⇒</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>5. Conclusions and Future Work</title>
      <p>This paper discusses the technology used to obtain data, the steps involved in the estimation of
symbolic location and the methods applied for the descriptive analysis of people’s rule-based
habits. The data used in the paper are limited due to time mismatches, excessive missing data
and small sample sizes. Rule association algorithms have potential, but require a large amount
of sample information and may generate redundant rules. On the other hand, decision trees
provide robust rules and a clear visualisation and interpretation of them. As possible lines of
future work, we propose to improve the sample quantity by generating synthetic data and the
possibility of using Bayesian networks. Alternatively, we are working on a new longer data
campaign in order to better verify this proposal.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Ramli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , E. Henricson,
          <string-name>
            <given-names>X.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>An overview of human activity recognition using wearable sensors: Healthcare and artificial intelligence</article-title>
          ,
          <source>in: International Conference on Internet of Things</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Biswas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rahman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Kaiser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. Al</given-names>
            <surname>Mamun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. S.</given-names>
            <surname>Ebne Mizan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Islam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mahmud</surname>
          </string-name>
          ,
          <article-title>Indoor navigation support system for patients with neurodegenerative diseases</article-title>
          ,
          <source>in: Brain Informatics: 14th International Conference, BI</source>
          <year>2021</year>
          ,
          <string-name>
            <given-names>Virtual</given-names>
            <surname>Event</surname>
          </string-name>
          ,
          <source>September 17-19</source>
          ,
          <year>2021</year>
          , Proceedings 14, Springer,
          <year>2021</year>
          , pp.
          <fpage>411</fpage>
          -
          <lpage>422</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Montoliu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pérez-Navarro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Torres-Sospedra</surname>
          </string-name>
          ,
          <article-title>Eficient tuning of  nn hyperparameters for indoor positioning with n-tbea</article-title>
          ,
          <source>in: 2022 14th International Congress on Ultra Modern Telecommunications and Control Systems and Workshops (ICUMT)</source>
          , IEEE,
          <year>2022</year>
          , pp.
          <fpage>39</fpage>
          -
          <lpage>44</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S. L.</given-names>
            <surname>Plaza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Colás</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Martín</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M. V.</given-names>
            <surname>Carrizo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Sansano-Sansano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. J. G.</given-names>
            <surname>Domínguez</surname>
          </string-name>
          ,
          <article-title>Ble rssi database for analyzing routines of community-dwelling older adults</article-title>
          ,
          <source>in: 2022 14th International Congress on Ultra Modern Telecommunications and Control Systems and Workshops (ICUMT)</source>
          , IEEE,
          <year>2022</year>
          , pp.
          <fpage>50</fpage>
          -
          <lpage>55</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>G.</given-names>
            <surname>Maus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Kuxdorf-Alkirata</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Brückmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gemci</surname>
          </string-name>
          ,
          <article-title>A low-cost ble based sensor platform for eficient received signal strength monitoring</article-title>
          ,
          <source>in: 2019 IEEE 62nd International Midwest Symposium on Circuits and Systems (MWSCAS)</source>
          , IEEE,
          <year>2019</year>
          , pp.
          <fpage>1199</fpage>
          -
          <lpage>1202</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Orenes-Vera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Terroso-Saenz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Valdes-Vela</surname>
          </string-name>
          ,
          <article-title>Recite: A framework for user trajectory analysis in cultural sites</article-title>
          ,
          <source>Journal of Ambient Intelligence and Smart Environments</source>
          <volume>13</volume>
          (
          <year>2021</year>
          )
          <fpage>389</fpage>
          -
          <lpage>409</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>V.</given-names>
            <surname>Shubina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ometov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Basiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. S.</given-names>
            <surname>Lohan</surname>
          </string-name>
          ,
          <article-title>Efectiveness modelling of digital contacttracing solutions for tackling the covid-19 pandemic</article-title>
          ,
          <source>The Journal of Navigation</source>
          <volume>74</volume>
          (
          <year>2021</year>
          )
          <fpage>853</fpage>
          -
          <lpage>886</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Martín</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. M.</given-names>
            <surname>Gordo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. G.</given-names>
            <surname>Gómez</surname>
          </string-name>
          , S. G. de Villa,
          <string-name>
            <given-names>S. L.</given-names>
            <surname>Plaza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. J. G.</given-names>
            <surname>Domínguez</surname>
          </string-name>
          ,
          <article-title>Ble-based approach for detecting daily routine changes</article-title>
          ,
          <source>in: 2021 IEEE International Symposium on Medical Measurements and Applications (MeMeA)</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>S. L.</given-names>
            <surname>Plaza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Colás</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Martín</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M. V.</given-names>
            <surname>Carrizo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Sansano-Sansano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. J. G.</given-names>
            <surname>Domínguez</surname>
          </string-name>
          ,
          <article-title>Ble rssi database for analyzing routines of community-dwelling older adults</article-title>
          ,
          <source>in: 2022 14th</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>