Skip to main content
. 2023 May 17;11:306–317. doi: 10.1109/JTEHM.2023.3276943

Fig. 4.

Fig. 4.

Split the data into inputs and target, and inputs’ embedding. The patient represented made eight visits, and the diff_dgn set is Inline graphic. We have records extending until 1,140 days after this patient’s sleep-apnea diagnosis. The goal is to predict the visit cost over the last year ( Inline graphic) on the basis of the previous visits’ records (from the date of G47.3 diagnosis to day 776). Therefore, the time indices for the inputs and target are the maximum between 0 and 776 and the minimum between 776 and the last visit point, day 1,140. In line with the definition Inline graphic and Inline graphic, the inputs for this patient are the records from day 0 to day 690 from diagnosis, and the targets are the visit costs from day 810 to 1,140. The autoregressive prediction mechanism of Transformer is shown at right.