INDOOR LOCALISATION FOR DETECTING MEDICA-TION USE IN PARKINSON'S DISEASE

Abstract

Parkinson's disease (PD) is a slowly progressive debilitating neurodegenerative disease which is prominently characterised by motor symptoms. Indoor localisation, including its in-home mobility features, could provide a digital biomarker that can be used to quantify how mobility changes as this disease progresses. To improve the effectiveness of current methods for indoor localisation, a transformer-based approach utilising multiple modalities, Received Signal Strength Indicator (RSSI) and accelerometer data from wearable devices, which provide complementary views of movement, is proposed. To properly evaluate our proposed method, we use a free-living dataset where the movements and mobility are greatly varied and unstructured as expected in real-world conditions. 12 pairs of people (one with PD, and the other a control participant) lived for five days in a smart home with various sensors. Our evaluation on such a dataset, which includes subjects with and without PD, demonstrates that our proposed network outperforms the current state-of-the-art in indoor localisation. We also show how the accurate room-level localisation predictions can be transformed into in-home mobility features (i.e. room-to-room transition duration) which can be used to effectively classify whether the PD participant is taking their medications or withholding them (increasing their symptoms).

1. INTRODUCTION

Parkinson's disease (PD) is a neurodegenerative disorder that affects around six million people worldwide. It is a chronic disease with four main symptoms: tremor, bradykinesia (slowness of movement), rigidity, and postural instability Jankovic (2008) . Although PD is a slowly progressive disease, the symptoms can fluctuate hourly depending on medication intake timing, stress and other factors. These fluctuations make it challenging to capture the slow symptom progression in an individual (needed for example to measure how a new therapy changes disease progression) accurately over time using infrequent clinic or lab-based "snapshot" clinician-patient interactions. Also, to help a clinician understand the impact of PD on a patient, continuous monitoring is needed to give an accurate evaluation of how severe the symptoms and their fluctuations are for that individual. One method to determine whether sensor based monitoring can detect symptom fluctuations in PD is by evaluating the patients in an "OFF" medication state (i.e. when they have not taken their medication) since, when they withhold medications, patients tend to experience a worsening of symptoms. For example, when "OFF" medications, motor symptoms can become more severe which may hinder the subject's gait and movement around their own home. As a result, they may typically need more time to transition between rooms. Indoor localisation can be used to measure transitions between rooms in a home. Knowing how slow or fast a person transitions between rooms may be able to predict whether a person is in an "OFF" medication state or not and, longer-term, interpret their symptoms' severity (e.g. de novo freezing of gait in a hallway could indicate symptom progression) Bachlin et al. (2009) . Localisation can also add context in the measurement of other behaviours such as urinary function monitoring (e.g., how many times someone visits the bathroom overnight) which can impact the quality of life with PD He et al. (2016) . To perform indoor localisation in home environments, IoT-based platforms with multimodal sensors combined with machine learning can be used to provide an unobtrusive and continuous localisation. Typically, a wearable inertial measurement unit (IMU) is used to produce a received signal strength indicator (RSSI) at points throughout a home, which can be used to create radio-map features for room-level localisation. To provide more accurate localisation, accelerometer data from the same wearable can also be used as it provides a means to distinguish different activities (e.g., walking vs standing). As some activities are tied to particular rooms (e.g. stirring a pan on the hob must be in a kitchen), accelerometer data may enrich RSSI in differentiating adjacent rooms, which RSSI alone may struggle with Jovan et al. (2022) . If accelerometer data are to provide extra features for separating adjacent rooms, greater consideration must be given to data generalisation across different PD patients. As PD is a heterogeneous disease, the severity of symptoms may vary from one patient to another Greenland et al. (2019) . These severe symptoms, such as tremor, may affect the generalisation of accelerometer data, especially those worn on the patient's wrists, which is a common and well accepted placement location. Naively combining the accelerometer data with the RSSI may impair the performance of indoor localisation due to differing levels of tremor manifesting in the acceleration signal. In this work, we make two main contributions. (1) We describe the utilisation of RSSI enriched by the accelerometer data to perform room-level localisation. Similar to Jovan et al. (2022) , our proposed network intelligently chooses accelerometer features which may improve the RSSI performance in performing indoor localisation. To properly evaluate our proposed method, we use a free-living dataset where the movements and mobility are greatly varied and unstructured as expected in real world conditions. Our evaluation on such a dataset, which includes subjects with and without PD, demonstrates that our proposed network outperforms the current state-of-the-art DCMN (Jovan et al. (2022) ) in all categories. (2) We also show how the accurate room-level localisation predictions can be transformed into in-home mobility features (i.e. room-to-room transition duration) which can be used to effectively classify the "OFF" or "ON" medication state of a PD patient.

2. RELATED WORK

Early work in machine learning for monitoring a long-term neurodegenerative disease like PD started with a simple PD classification Fraiwan et al. (2016) or easy-to-distinguish symptoms identification Arora et al. (2015) ; Fisher et al. (2016) using one single sensor modality such as vision sensors for simplicity Li et al. (2018) . As the research progressed, multiple sensors have been considered for performance improvement in identifying PD symptoms. For example, Heidarivincheh et al. (2021) utilised vision and accelerometer sensors available in a smart home to classify PD from non-PD. Masullo et al. (2020) match video sequences of silhouettes to accelerations from wearable sensors for a person re-indentification in a home environment. Notably, all of this research uses vision as their main data source; although powerful and rich in features, vision sensors typically raise privacy challenges in home settings and are typically absent in key rooms within the home for this reason. RSSI data produced from wearable devices is one such mechanism with less privacy concerns. In indoor localisation, fingerprinting using RSSI is the typical technique used to estimate the location of wearable devices by exploiting this signal that can be measured in the environment. RSSI signals are not stable, they fluctuate randomly due to shadowing, fading and multi-path effects. However, many techniques have been proposed in recent years to tackle these fluctuations, and, indirectly, improve the localisation accuracy. Some of the work, Zhang et al. (2016) , utilise deep neural network (DNN) to generate coarse positioning estimates from RSSI signals, which are then refined by a hidden Markov model (HMM) to produce a final estimate location. Other works, Ibrahim et al. (2018) , try to utilise a time-series of RSSI data and exploit the temporal connections within each access point to estimate room-level position. A CNN is used to build localisation models to further leverage the temporal dependencies across time-series readings. It has been suggested that we cannot rely on RSSI alone for indoor localisation in home environments for PD subjects due to shadowing rooms with tight separation Pandey et al. (2021) . Jovan et al. (2022) et al. combine RSSI signals (for location estimate) and accelerometer data (for body movement estimate) to produce a more accurate location estimate by utilising a wider range of features to differentiate adjacent rooms. Their proposed network has shown an improvement in tracking a person with PD in a hallway that, in turn, can be used to track their transition time between rooms. Our work is inspired by Jovan et al. (2022) with two main improvements. While Jovan et al. capture local temporal patterns of RSSI and accelerometer data via recurrent neural network, we capture the patterns through the use of causal convolutional neural networks (CNN). In addition, unlike Jovan et al. who stop at predicting room-to-room transition durations, we go a step further and use roomto-room transition behaviours, as input features to a simple binary classifier, to predict whether the PD participants is taking their medications or withholding them.

3. COHORT AND DATASET

Dataset. This dataset was collected using wristband wearable sensors, one on each wrist of all participants, containing tri-axial accelerometers and 10 Access Points (APs) placed through the residential home, each measuring the RSSI Kozlowski et al. (2018) . The wearable devices wirelessly transmit data using the Bluetooth Low Energy (BLE) standard which can be received by the 10 APs. Each AP records the transmitted packets from the wearable sensor which contains the accelerometer readings sampled at 30Hz, with each AP recording RSSI values sampled at 5 Hz. The dataset contains 12 pairs of participants living freely in a smart home for five days. Each pair consists of one person with PD and one person as the healthy control volunteer (HC). This pairing was chosen to enable PD vs HC comparison, for safety reasons for the person with PD, and also to increase the naturalistic social behaviour, particularly amongst the spousal pairs who already lived together. From the 24 participants, five females and seven males have PD. The average age of the participants is 58.5 and the average time since PD diagnosis for the person with PD is 11.3 years. To measure the accuracy ML models, wall-mounted cameras are installed in the ground floor of the house as ground truth which capture red-green-blue (RGB) and depth data during the day for 2-3 hours daily. These cover the kitchen, hallway, dining room, living room, stairs, and porch. The duration of data recorded by the cameras for PD and HC is 72.84 and 75.31 hours, respectively, which provides a relatively balanced label set for our room-level classification. Finally, to evaluate the "OFF" medication state, participants with PD were asked to withhold their dopaminergic medications so that they were in the practically-defined "OFF" medications state for a period of several hours within five days. Data pre-processing. The two wearable sensors worn by each participant are grouped together based on their types, i.e., twenty RSSI values corresponding to 10 APs for each wearable sensor, and six spatial directions corresponding to three spatial directions (x, y, z) for each wearable, at each time. The accelerometer data is resampled to 5Hz to synchronise the data with RSSI value. With a 5-second time window, RSSI has an input of size (25 x 20) and accelerometer data has an input of size (25 x 6). Imputation for missing values, specifically for RSSI data, is applied by replacing the missing values with a value that is not possible normally (i.e., -120dB). Both RSSI and accelerometer data were ignored when participants were out of the house. Finally, all timeseries measurements by the types are normalized to be within the range of zero and one before they are processed by a neural network model. Our main focus is for our neural network model to produce in-home mobility features particularly for persons with PD. We hypothesize that during their "OFF" medication state, the deterioration in mobility of a person with PD is exhibited by how they transition between rooms. These features include 'Room-to-room Transition', and the 'Number of Transitions' between two rooms. With the layout of the house where participants stayed, the hallway is used as a hub connecting any other room on the ground floor, and 'Room-to-room Transition' shows the transition duration (in seconds) between two rooms connected by the hallway. The transition between (1) kitchen and living room, (2) kitchen and dining room, and (3) dining room and living room are chosen as the features due to their commonalty across all participants. For these features, we limit the transition time duration (i.e. the time spent in the hallway) to 60 seconds. These features are produced by each model through the use of all available data from 12 PD participants including unannotated data from 6 a.m. to 10 p.m. daily which are aggregated into 4 hour window. From this, each PD participant will have 20 samples (four samples for each day), each of which contains six features (three for room-to-room transition duration, and three for the number of room-to-room transitions), and only one of which represents "OFF" medication state. These fea-tures are then fed to a simple binary classifierfoot_0 determining whether a person with PD is on their medication or not. Suppose we have a collection of RSSI signals x r " rx r 1 , . . . , x r T s P R T ˆr , and accelerometer data x a " rx a 1 , . pê y , xr q " DCM N px r , x a q (1) Jovan et al. (2022) suggested êy is trained to generate the likelihood estimate of room predictions, while xr is used in an auto-encoding fashion to enhance the representation power of RSSI data. The final loss function is a combination of both likelihood and reconstruction losses:

4. ROOM-LEVEL LOCALISATION WITH MULTI-SENSORY INPUTS

Lpê y , y, xr , x r q " L N LL pê y , yq `T ÿ i"1 L R px r i , x r i q (2) with L N LL p.q represents the negative log-likelihood and L R p.q denotes the reconstruction loss. The Issues. Although DCMN Jovan et al. (2022) has a good attempt at utilising multiple sensor data to perform indoor localisation, there are several issues with the technique that limit its performance: 1. (2014) . Furthermore, when two summarised contexts at different time points arrive at the MultiHead Self-Attention (MHSA) layer, even though they might be of similar patterns, the query-key matching of MHSA will not be able to capture the similarity due to their point-wise computation. 2. The Mix-Matched of Local Context Between Two Sensors. Figure 1a shows that the inputs to the modality enrichment layer are the summarised RSSI context and the summarised accelerometer context at each time step t. Since there is no way to fix the length of local context that the LSTM can squeeze, the summarised context contain variable lengths of previous information. This varies not only among different time step t but also between RSSI signals and the accelerometer data at the same time step t. 3. Unnecessary Reconstruction Loss. In Equation 2, the reconstruction loss acts as a regularisation and also to capture the data distribution of the RSSI signals. However, to capture in-home mobility which heavily relies on correctly predicting hallway, reconstruction loss might work against predicting hallway due to relatively infrequent labels for the hallway compared to other room locations. We would, therefore, like to remove the use of reconstruction loss and add a different loss that improves the accuracy of predicting particular room locations with less labels in a home.

4.1. LOCALITY ENHANCEMENT WITH DUAL CONVOLUTIONAL SELF-ATTENTION

As it is time series data, the importance of an RSSI or accelerometer value at each point in time can be identified in relation to its surrounding values -such as cyclical patterns, trends, or fluctuations. Utilising historical context, that can capture local patterns on top of point-wise values, can thus lead to performance improvements in attention-based architectures. We consider to replace the LSTM on Figure 1a with a combination of causal convolution layers and a self-attention layers as Dual Convolutional Self-Attention (DCSA). The causal convolution layer was firstly introduced by Li et al. ( 2019) with kernel size k and stride 1 to extract local patterns using the same filter across all time. Note that causal convolutions ensure that the current position never has access to future information. The DCSA takes in a primary input x1 P R T ˆd and a secondary input x2 P R T ˆd and yields: DCSA k px 1 , x2 q " GRN pN ormpΦpx 1 q `x 1 q, N ormpΦpx 2 q `x 2 qq (3) with Φpxq " SA ´Φk pxq W Q , Φ k pxq W K , x W V ¯(4) where GRN p.q is Gated Residual Network (GRN), introduced by Lim et al. (2019) , to integrate dual inputs into one integrated embedding, N ormp.q is a standard layer normalisation, SAp.q is a scaled dot-product self-attention introduced in Vaswani et al. ( 2017), Φ k p.q is a 1D-convolutional layer with a kernel size t1, ku and a stride 1, W K P R dˆd , W Q P R dˆd , W V P R dˆd are weights for keys, queries and values of the self-attention layer, and d is the embedding dimension. Note that all weights for GRN are shared across each time step t. M DCSA k1,...,kn px 1 , x2 q " Φ n pΦ k1,...,kn px 1 , x2 qq (5) with Φ k1,...,kn px 1 , x2 q " SApΞ k1,...,kn px 1 , x2 q W Q , Ξ k1,...,kn px 1 , x2 q W K , Ξ k1,...,kn px 1 , x2 q W V q (6) Ξ k1,...,kn px 1 , x2 q " rDCSA k1 px 1 , x2 q, . . . , DCSA kn px 1 , x2 qs (7) where Φ n p.q is a 1D-convolutional layer with a kernel size t1, nu and a stride n, W K P R dˆd , W Q P R dˆd , W V P R dˆd are weights for keys, queries and values of the self-attention layer, and Ξ k1,...,kn p.q concatenates the output of each DCSA k p.q in temporal order. For regularisation, a normalisation layer followed by a dropout layer is added after Equation 5. Feature Transformation. Without LSTM layers acting as an encoder, a linear layer with a positional encoding is added to transform both RSSI and accelerometer data into their respective embeddings. The positional embeddings of RSSI h r " rh r 1 , . . . , h r T s and accelerometer h a " rh a 1 , . . . , h a T s are then fed to an MDCSA network with various kernel size rk 1 , . . . , k n s: ĥ " M DCSA k1,...,kn ph r , h a q (8)

4.3. FINAL LAYER AND LOSS CALCULATION

We apply two different layers to produce two different outputs during training. The room-level predictions are produced via a single conditional random field (CRF) layer in combination with a linear layer applied to the output of Equation 8to produce the final predictions as ŷt " CRF `Wp ĥt `bp ˘(9) where W p P R dˆm , and b p P R m are weight and bias to learn, m is the number of room locations, and ĥ " r ĥ1 , . . . , ĥT s P R T ˆd is the refined embedding produced by Equation 8. For the second layer, instead of trying to reconstruct the RSSI and comparing it with the actual RSSI signals, we choose a particular room as a reference and perform a binary classification at each time step t. The binary classification is produced via a linear layer applied to the refined embedding ĥ as βT " W β ĥt `bβ (10) where W β P R dˆ1 , and b β P R are weight and bias to learn, and β " r β1 , . . . , βT s P R T is the target probabilities for the referenced room within time window T . The binary classification loss can be formulated through the use of binary cross entropy loss function described as: L BCE p β, βq " ´1 T T ÿ i"0 β i logp βi q `p1 ´βi q logp1 ´β i q (11) where β " rβ 1 , . . . , β T s P R T is the binary value whether at time t the room is the referenced room or not. The final loss function is the Equation 2 with the L R p.q being replaced by Equation 11.

5. EXPERIMENTS AND RESULTS

We compare our proposed network with the base model of Jovan et al. (2022) as a SOTA representation for indoor localisation with dual modalities, Random Forest (RF) as a most baseline technique which has been shown to work well for indoor localisation, and TENER Yan et al. (2019) which is a modified transformer encoder in combination with a CRF layer. TENER represents a model with capability to capture global dependency and enforce dependencies across temporal aspects; hence, it can be considered as our algorithm without the locality enhancement -it can be regarded as ablations. As a completion for the ablation study, we also include MDCSA 1 network when our network only uses MDCSA with a single DCSA kernel of size 1foot_1 , and "Ours RSSI" network when our network only uses RSSI, without ACCL, as its input features. For RF, all time series features of RSSI and accelerometer are flattened and merged into one long feature vector for room-level localisation. For TENER, at each time step t, RSSI x r t and accelerometer x a t features are combined via a linear layer before they are processed by the networks. A grid search on the parameters of each network is performed to find the best parameter for each model. The parameters to tune are: the embedding dimension d in t128, 256u, the number of epochs in t200, 300u, and the learning rate in t0.01, 0.0001u. The dropout rate is set to 0.15, and the RAdam optimizer Liu et al. (2019) in combination with Look-Ahead algorithm Zhang et al. (2019) is used for the training with early stopping using the validation performance. For RF, we perform a cross-validated parameter search for the number of trees (t200, 250u) and the minimum number of samples in a leaf node (t1, 5u). The Gini impurity is used to measure splits. Evaluation Metrics. We are interested in developing a system to monitor PD progression in home environments. For example, we will consider if there is any significant difference in the performance of the systems when trained on a person with PD versus trained on someone without. Doing this may provide a useful insight whether there is any benefit to a person with Parkinson's to train our model with a training data from a healthy control (HC). We tailored our training procedure to test our hypothesis by performing variations of cross-validations. Apart from training our models on all HC subjects (ALL-HC), we also perform four different kinds of cross-validation: 1) We leave one PD subject out as training data (LOO-PD), 2) we leave one HC subject out as training data (LOO-HC), 3) We leave one HC subject and use only roughly four minutes worth of data as training (4m-HC), 4) We leave one PD subject and use only roughly four minutes worth of data as training (4m-PD). For all of our experiments, we test our trained models on all PD subjects (excluding the one used as training data for LOO-PD and 4m-PD). For room-level localisation accuracy, we use precision and weighted F1-score, all averaged and standard deviated across the test folds. To showcase the importance of in-home mobility features in differentiating the medication state of a person with PD, we first compare how accurate the 'Room-to-room Transition' duration produced by each network to the ground truth. We hypothesis that the more accurate the transition to the ground truth the better mobility features are for medication state classification. For the medication state classification, we then compare two different groups of features for each network: 1) the baseline demographic features such as age, gender, years of PD, and PD assessment score specifically the Movement Disorders Society-sponsored revision of the Unified Parkinson's Disease Rating Scale motor subscore (MDS-UPDRS III), and 2) the normalised in-home mobility features. The metric we use for "ON" / "OFF" medication state evaluation is the weighted F1-Score and AUROC which are averaged and standard deviated across the test folds.

5.1. EXPERIMENTAL RESULTS

Room-level Accuracy. The first part of Table 1 compares the performance of our network and any other network for room-level classification. For the room-level classification, our network outperforms other networks and RF with a minimum improvement of 1.3% for the F1-score over the second best network (i.e. DCMN) in each cross-validation type with the exception of the ALL-HC validation. The improvement is more significant on the 4m-HC and 4m-PD validations, when the training data are limited, with an average improvement at almost 9% for the F1-score over the DCMN. The LOO-HC and LOO-PD validation show that a model that has the ability to capture the temporal dynamics across time steps (e.g. TENER and DCMN) will perform better than a standard baseline technique such as Random Forest. DCMN performs better in those two validations due to its ability to capture asynchronous relation across modalities Jovan et al. (2022) . However, when the training data become limited as in 4m-HC and 4m-PD validations, having extra capabilities is necessary to further extract temporal information and correlations. Due to being a vanilla transformer requiring considerable amount of training data, TENER performs worst in these two validations. DCMN performs quite well due to its ability to capture local context via LSTM for each modality and suppress a noisy modality, i.e. noisy accelerometer data via GRN. Our proposed network has all the capabilities that DCMN has with an improvement in the local context matching across modalities via DCSA. The local context matching capability seems to have a big impact in maintaining the performance of the network when the training data is limited. It is shown by how the MDCSA 1 outperforms the DCMN by an average of 7% for the F1-score in 4m-HC and 4m-PD validations.

Room-to-room Transition and Medication Accuracy

The second part of the Table 1 shows the performance of all our networks for medication state classification. The Demographic Features can be used as a baseline for each type of validation. Our network, with the exception of the ALL-HC validation, outperforms any other network by a significant margin for the AUROC score. A minimum of 15% improvement over the baseline demographic features can be obtained by using the in-home mobility features produced by our model trained on ALL-HC training data. In 4m-PD validation data, demographic features show that its performance is not better than a simple random binary function with an AUROC score of 50.53% while our proposed network manages to achieve a 76.39% AUROC score with just 7.5% down from its best score in the LOO-HC validation. In the same validation, RF, TENER, and DCMN could not manage to provide any prediction due to their inability to capture (partly) hall transitions which are the main features for data samples for medication state classification. Furthermore, TENER model has shown its inability to provide any medication state prediction from the 4m-HC data validations. It can be traced back to Table 2 where the TENER model can not capture any transition between dining room and living room across all PD participants resulting incomplete features for all samples in 4m-HC validations. Our proposed network (and all its variations) are able to provide medication state prediction and maintain its performance across all cross-validations thanks to the addition of Equation 11 in the loss function calculation which forces the model to predict correctly the hall transitions. This is validated in Table 2 which shows that our proposed network, on average, has the closest transition duration prediction to the ground truth beating the second best by around 0.5 seconds across all hall transitionsfoot_4 .

6. CONCLUSION

We have presented a new approach for indoor localisation utilising RSSI and accelerometer data. Our approach is based on (1) a novel transformer structure, which is carefully designed to take dual time-series inputs in combination with an CRF layer enforcing correct transition among time steps, and (2) an alteration to the loss function proposed in Jovan et al. (2022) to further strengthen the room-to-room transition prediction. We demonstrated that our proposed model is able to outperform the Dual Modality Context Network (DCMN) Jovan et al. (2022) , and achieve SOTA results in roomlevel predictions on data collected of people with and without PD living freely in a smart home. Within naturalistic settings, in-home mobility can be measured using our proposed approach, and we hypothesize that a person with PD during their "OFF" medication state shows signs of slowing in how they transition between rooms in their house. We show that, through our network which is a combination of multiple dual convolutional self-attention (MDCSA) and a CRF model, having an accurate indoor localisation system will give accurate in-home mobility features. This will lead to an accurate classifier model which can differentiate succinctly if a person with PD is in an "ON" or "OFF" medication state. We demonstrated that our proposed model is able to produce accurate in-home mobility features, which result in outperforming in-home mobility features produced by other models with an average improvement over 10% to the second best in AUROC score.



The Random Forest is chosen as a binary classifier; It is not the one used for indoor localisation. Our regular network uses MDCSA1,4,7 with kernels of size 1, 4, and 7 The average ignores the 4m-PD validations since RF and DCMN does not have (some) hall transitions



Figure 1: Overview of the base model of Jovan et al. (2022) against our proposed model.

MULTIHEAD DUAL CONVOLUTIONAL SELF-ATTENTIONSimilar to the base model, our approach employs a self-attention mechanism introduced byVaswani  et al. (2017)  to capture global dependencies across time steps. It is embedded as part of the DCSA architecture. Inspired byVaswani et al. (2017)  in utilising multi self-attention, we utilise our DCSA with various kernel length with the same aim: allowing asymmetric long-term learning. The multihead DCSA, shown as part in Figure1b, takes in two inputs x1 , x2 P R T ˆd and yields:

During training, DCMN gets x r and x a as inputs, and produces reconstructed RSSI signals xr " rx r 1 , . . . , xr T s P R T ˆr and embeddings of the predicted room locations (outputs before they go through Conditional Random Field layer) êy " rê 1 , . . . , êT s P R T ˆd with d as the embedding dimension, i.e.:

The Lack of Local Context Matching with LSTM. Patterns in time series may evolve and can be repeated with time due to various events (e.g. RSSI signals that fluctuate due to shadowing), so whether an observed point is an anomaly (e.g. a sudden drop of one of the RSSI signals) or part of the patterns is highly dependent on its surrounding context. However, in LSTM layers, the local context is summarised based on the previous summarised context and the current input. Two similar patterns separated by a long period of time might have different context if they are processed by the LSTM layersBahdanau et al.

Room-level and medication state accuracy of all models. Standard deviation is shown under p.q, the best performer is bold, while the second best is italicized.

Room-to-room transition accuracy of all models.

