Algorithm 3 Trend Attention Mechanism. |
Input:
physiological time series S
Output:
trend level attention weights
-
1:
; // normalize each channel of the time series
-
2:
; // calculate the mean of the k- segment
-
3:
; // calculate the difference between all the segments
-
4:
; // obtain the maximum value of
-
5:
= getSim(X, ); // calculate the similarity between X and
-
6:
= getFull(); // convert into through the fully connected layer
-
7:
= softmax(); // calculate the trend level attention weights
|