2.2.3. Fuzzy Temporal Aggregation of the Heart Rate Stream

In the practice of developing based-sensor systems, the temporal component in the data streams is a critical aspect to analyze [38]. For example, in a given current time when we evaluate the heart rate sensor stream, we can take into account the last single sample of HR or calculate an average within a sliding window.

In this work, we propose fuzzy temporal aggregation [8], which provides a model to: (1) weight linguistic terms based on temporal membership functions; (2) define progressive and interpretable temporal linguistic terms; and (3) give flexibility in the presence of eventual signal loss or variance in the sample rate.

Based on previous works [8,39], we have integrated a fuzzy aggregation of the terms in the heart rate sensor stream using fuzzy temporal windows, which are straightforwardly described in function of the distance from each sample time-stamp *ts* = {*t*0, . . . , *tn*} to the current time ∆*t<sup>i</sup>* = *t<sup>i</sup>* − *t*0.

First, the degrees of a fuzzy term, in our case *V* = {*low*, *adequate*, *high*}, are weighted by the degree of their time-stamps evaluated by a fuzzy temporal window *T<sup>k</sup>* defined by Equation (6).

$$V\_r \cap T\_k(\bar{hr\_i}) = V\_r(hr\_i) \cap T\_k(\Delta t\_l) \in [0, 1] \tag{6}$$

Secondly, the degrees of membership over the fuzzy temporal window are aggregated using the t-conorm operator in order to obtain a single degree of both fuzzy sets *V<sup>r</sup>* ∩ *T<sup>k</sup>* by Equation (7).

$$V\_r \cup T\_k(S\_{\bar{l}\bar{r}}) = \bigcup\_{\bar{h}\bar{r}\_l \in S\_{\bar{l}\bar{r}}} V\_r \cap T\_k(\bar{h}\bar{r}\_l) \in [0, 1] \tag{7}$$

We note several fuzzy operators can be applied to implement the aggregation. However in this paper, we propose a fuzzy weighted average [40] as is recommended in the case of high sample rates from wearable sensors [8]. The aggregation process is defined by Equation (8).

$$V\_r \cup T\_k(S\_{\tilde{hr}}) = \frac{1}{\sum T\_k(\Delta t\_i)} \sum V\_r(hr\_i) \times T\_k(\Delta t\_i^j) \in [0, 1] \tag{8}$$

The definition and adequacy of several temporal windows, which model the evolution of linguistic terms in the heart rate stream, are discussed in Section 4.
