I n d on e s i an   Jo u r n al   o El e c t r i c al   En gi n e e r i n g   an d   C o m p u te r   S c i e n c e   V o l .   40 ,   N o .   1 O c t o be r   2 025 ,   pp .   530 ~ 544   IS S N :   2502 - 4752 ,   D O I :   10. 1 1591 / i j e e c s . v 40 .i 1 . pp 530 - 544             530     Jou r n al   h o m e pa ge ht t p: / / i j e e c s . i a e s c or e . c om   Pr e d i c t   g l u c o s e   v a l u e s   w i t h   D E   a l g o r i t h m   o p t i m i z e d   T - L S T M       Q i n gX i an Bi an 1 ,   A z i z an   A s ’a r r ay 1 ,   X i an gG u o   C o n g 2 ,   K h ai r i l   A n as   b i n   M d   R e z al i 1   R aja  M o h d   K am i l   b i n   R aj A h m ad 3 ,   M o h d   Zar h am d M d .   Za i n 4   1 D e p a rt m e n t   o f   M e c h a n i c a l   a n d   M a n u f a c t u ri n g   E n g i n e e ri n g ,   F a c u l t y   o E n g i n e e ri n g ,   U n i v e r s i t i   P u t ra   M a l a y s i a ,   S e r d a n g ,   M a l a y s i a   2 D e p a rt m e n t   o f   E n d o c r i n o l o g y ,   T h e   A ffi l i a t e d   S u z h o u   H o s p i t a l   o N a n j i n g   M e d i c a l   U n i v e r s i t y ,   S u z h o u   M u n i c i p a l   H o s p i t a l ,     S u z h o u ,   C h i n a   3 D e p a rt m e n t   o f   E l e c t ri c   a n d   E l e c t r o n i c s   E n g i n e e ri n g ,   F a c u l t y   o E n g i n e e ri n g ,   U n i v e r s i t i   P u t ra   M a l a y s i a ,   S e r d a n g ,   M a l a y s i a   4 D e p a rt m e n t   o f   A p p l i e d   M e c h a n i c s   a n d   D e s i g n ,   F a c u l t y   o f   E n g i n e e ri n g ,   U n i v e r s i t i   T e k n o l o g i   M a l a y s i a ,   J o h o r,   M a l a y s i a       A r ti c l e   I n fo     A B S TR A C T   Ar t i c l e   h i s t or y :   R e c e i v e D e c   30 2024   R e v i s e A pr   13 2025   A c c e pt e J ul   4 2025       T he   p r e v a l e nc e   o f   di a b e t e s   i s   r i s i ng .   A c c o r di ng   t o   t he   I nt e r na t i o na l   D i a b e t e s   F e de r a t i o n   ( I D F )   p r e d i c t i o ns ,   t he   n um be r   o f   di a be t i c   pa t i e nt s   w o r l d w i de   w i l l   r e a c h   608   m i l l i o i n   203 0,   a c c o unt i ng   f o r   a p pr o xi m a t e l y   11. 3 %   o f   t he   t o t a l   num be r   o f   pe o pl e   i n   t he   w o r l d .   T o   m o ni t o r   a nd   p r e di c t   t he   f ut u r e   1   ho ur   g l uc o s e   ha v e   a   g r e a t   s i g ni f i c a nc e   m e a n i ng   f o r   pa t i e nt s .   T h i s   r e s e a r c u t i l i z e s   a   d i f f e r e n t i a l   e v o l ut i o ( D E )   a l g o r i t hm ,   a n   o pt i m i z e d   hy br i m o de l   t r a ns f o r m e r   a nd   l o ng   s ho r t - t e r m   m e m o r y   ( T - L S T M )   t e c hno l o g i e s   t o   a na l y z e   hi s t o r i c a l   d a t a   f r o m   c o nt i n uo us   b l o o g l uc o s e   m o ni t o r i ng   ( C G M )   s y s t e m s   a nd   e qu i pm e n t   c a l i b r a t i o v a l ue s .   T he   a i m   i s   t o   pr e di c t   f ut u r e   bl o o s ug a r   l e v e l s   i n   p a t i e n t s ,   t he r e by   he l pi ng   t o   p r e v e n t   e p i s o de s   o f   hy pog l y c e m i a   a nd   hy pe r g l y c e m i a .   T he   s t udy   t e s t e d   t he   m o de l   u s i ng   t h e   C G M   d a t a   f r o m   8   pa t i e n t s   a t   t he   S uz ho M un i c i pa l   H o s p i t a l   i n   J i a ng s u   P r o v i nc e ,   C h i na .   R e s u l t s   s ho w   t h a t   t h i s   DE - o pt i m i z e d   T - L S T M   m o de l   o ut pe r f o r m s   t r a d i t i o na l   m o de l s .   T h e   m o de l ' s   a c c ur a c y   i s   e v a l ua t e d   u s i ng   m e a n   s qu a r e d   e r r o r   ( M S E ) ,   w i t h   M S E   v a l ue s   r e c o r de d   a t   15 ,   30 ,   a n d   45   m i nu t e s   be i ng   0 . 9 6,   1. 54 ,   a nd   2. 31 ,   r e s p e c t i v e l y .   Ke y w or d s :   Co n t i nuo us   gl uc o s e   m o n i t o r i ng   D i f fe r e n t i a l   e v o l ut i o n   L o n s h o r t - t e r m   m e m o r y   P r e di c t i ng  a l go r i t h m   T r a n s f o r m e r   T hi s   i s   an   ope n   ac c e s s   ar t i c l e   u nde r   t he   C C   B Y - SA   l i c e ns e .     Cor r e s pon di n g   Au t h or :   A z i z a A s ’a rra y   D e pa rt m e n t   o f   M e c h a n i c a l   a n d   M a n uf a c t u ri n g   E n g i n e e ri n g ,   F a c ul t y   of   E n g i n e e ri n   U n i v e r s i t i   P ut ra   M a l a y s i a   43400  S e r d a n g ,   S e l a ngo r,   M a l a y s i a     E m a i l :   z i z a n@ u pm . e du. m y       1.   I N TR O D U C TI O N   D i a b e t e s   m e l l i t us   (D M po s e s   a   s i g ni f i c a n t   gl o b a l   h e a l t h   c ha l l e n ge ,   a f f e c t i n m i l l i o n s   w o r l dw i de .   E f fe c t i ve   m a na ge m e n t   o f   D M   n e c e s s i t a t e s   p r e c i s e   f o r e c a s t i ng  o f   b l oo gl uc o s e   l e v e l s   t o   pr e v e n t   c o m pl i c a t i o n s   s uc h   a s   h y p o gl y c e m i a   a nd  h y pe r gl y c e m i a .   T h e   i n c r e a s i n p r e v a l e n c e   of   di a b e t e s   gl ob a l l y   n e c e s s i t a t e s   a dv a n c e m e nt s   i m o n i t o r i ng   t e c hn o l o gi e s   t ha t   c a p r o v i de   a c c u r a t e   b l o o gl uc o s e   r e a di ngs .   A l o n g   w i t t h e   de v e l o pm e n t ,   c o n t i n uo us   b l o o gl uc o s e   m o ni t o ri n g   ( CG M )   s y s t e m s   e n a b l e   r e a l - t i m e   g l uc o s e   m o n i t o ri n f o pa t i e n t s .   H ow e ve r ,   t h e   m a r ke t   l a c ks   p r o duc t s   c a pa b l e   o f   fo r e c a s t i n g   gl uc o s e   v a l ue s ,   a   f e a t u r e   pri m a r i l y   e xpl o r e i a c a de m i c   r e s e a r c [ 1],   [ 2].   T r a di t i o na l   p r e di c t i v e   m o de l s   o f t e f a l l   s h o rt   i c a p t u r i ng  t h e   c o m pl e x,   n o nl i n e a r,   a n d   t i m e - v a r y i n g   n a t u r e   o f   b l ood  gl uc o s e   d y n a m i c s .   R e c e n t   a dv a n c e m e n t s   i m a c h i n e   l e a rn i ng,   p a r t i c ul a rl y   l o n s h o r t - t e r m   m e m o r y   (L S T M n e t w o r ks ,   ha v e   s h o w n   p r o m i s e   i m o de l i n t e m po ra l   de pe nde n c i e s   i gl uc o s e   t i m e - s e r i e s   da t a .   H ow e v e r ,   t h e   pe r f o r m a n c e   o f   L S T M   m o de l s   c a b e   f ur t h e r   e nh a n c e by   o pt i m i z i n t h e i r   p a r a m e t e r s .   I n c o rpo r a t i n g   di f f e r e n t i a l   e v o l ut i o n   (D E )   a l go ri t hm s   f o r   t h i s   o pt i m i z a t i o ha s   b e e n   e xpl o r e i n   s e v e r a l   s t u di e s .   T o   a dd r e s s   t hi s ,   t h i s   s t udy   i n t r o duc e s   a   D E   a l go ri t hm - o pt i m i z e d   T - L S T M   p r e di c t i o n   m o de l .   T hi s   i nn o v a t i v e   m ode l   m e r ge s   t h e   c a p a b i l i t i e s   o f   T r a n s f o r m e r   a n d   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       P r e di c t   g l uc os e   v al ue s   w i t D E   a l gor i t hm   opt i m i z e T - L ST M   ( Q i ngX i ang  B i an )   531   L S T M ,   o pt i m i z i n g   t i m e   s e r i e s   f o r e c a s t i n b y   l e v e r a gi n g   t he i r   s t r e n gt h s .   T h e s e   i n c l ude   t h e   a b i l i t y   t o   m o de l   l o n g - t e rm   de pe n de n c i e s ,   e xe c ut e   pa r a l l e l   c o m put a t i o n s ,   l e a rn   f e a t u r e   r e p r e s e nt a t i o n s ,   a nd  ha n d l e   m u l t i - s c a l e   da t a .   T h e   c o m b i n a t i o o f   T ra n s f o r m e a n d   L S T M   i t hi s   m o de l   c o n s i de ra b l y   e nha n c e s   f o r e c a s t i n g   a c c u r a c y   a n e f f i c i e n c y ,   pa rt i c ul a r l y   i n   s po t t i n t r e n ds ,   pe ri o di c   pa t t e rn s ,   a n l o n g - t e r m   r e l a t i o n s hi ps   i t i m e   s e ri e s   da t a   [3 ].   T r a d i t i o n a l   i n t e rm i t t e nt   b l o o s uga t e s t i ng  do e s   n o t   r e f l e c t   a   p a t i e n t ' s   ge n u i n e   b l o o s uga r   c h a nge s   ov e r   a   24 - h o u r   pe r i o [4] .   I n   c o nt r a s t ,   CG M   s y s t e m s   c o ul s h o w   r e a l - t i m e   gl uc o s e   v a l ue s   e v e r y   o r   m i n u t e s   [2] ,   [ 5].   T hi s   f r e que nt   m o n i t o ri n g   i s   c r uc i a l   f o r   e v a l ua t i n t r e a t m e n t   e ff e c t i v e n e s s   a n m a ki n g   m o r e   a c c ur a t e   a dj us t m e nt s   t o   t h e r a pe ut i c   p l a n s   [ 6].   CG M   s y s t e m s   a r e   a de pt   a t   p r e d i c t i n g   t h e   o n s e t   o h y pe r gl y c a e m i a   o h y po gl y c a e m i a ,   a l l o w i n g   f o r   a   m o r e   pe r s o na l i z e d   a nd  t a rge t e a pp r o a c t o   e nh a n c i ng  pa t i e nt   q ua l i t y   of   l i f e .   By   a l e r t i n g   pa t i e n t s   t o   i rr e gu l a gl uc o s e   l e v e l s ,   CG M - b a s e pr e d i c t i o m o de l s   e m pow e r   pa t i e n t s   t o   t a ke   t i m e l y   a c t i o [7] .   A ddi t i o n a l l y ,   t h e s e   m o de l s   c a m o r e   a c c u r a t e l y   r e pl i c a t e   t h e   s pe c i f i c   p h y s i o l o gi c a l   t ra i t s   o f   di v e r s e   po pul a t i o n s   a nd   r e v e a l   v a r y i n g   r e s po n s e s   t o   t r e a t m e n t s   a m o ng   pa t i e n t s   [8],   [9 ].   I n t e g r a t i ng  da t a   f r o m   m ul t i pl e   s o ur c e s   e na b l e s   t h e   c r e a t i o n   o f   c us t o m i z e t r e a t m e nt   p l a n s ,   a i di ng  pa t i e nt s   i b e t t e c o nt r o l l i n g   t h e i b l o o s uga l e v e l s   a nd   m i ni m i z i n g   c o m pl i c a t i o n s   [ 10].   CG M   de v i c e s   pr o v i de   i m m e di a t e   i n s i g h t s   i n t o   g l uc o s e   l e v e l s ,   t h e r e by   f a c i l i t a t i n i n f o r m e de c i s i o n s   a b o ut   i n s ul i n   do s a ge   a dj us t m e n t s   o r   di e t a r y   c ha n ge s   b a s e o n   b l o o s uga r   f l uc t u a t i o n s   [1 1] - [13] .   R e s e a r c i n   t he   f i e l d   o f   di a b e t e s   m a n a ge m e nt   ha s   i nc re a s i ng l y   f o c us e d   o t h e   u s e   o f   a dv a nc e d   c o nt r o l   s t ra t e g i e s   t o   e nha nc e   t he   pe r f o rm a nc e   o f   C G M   s y s t e m s .   F o r   i ns t a n c e ,   s t ud i e s   b y   r e s e a r c he rs   [1 4 ] ,   [1 5]   ha v e   e xp l o r e d   v a ri o us   a l go ri t hm i c   a pp ro a c h e s ,   i n c l u di ng   t he   a p p l i c a t i o o f   m a c hi ne   l e a rni n g   t e c hni q ue s   s uc a s   s up po rt   v e c t o m a c hi ne s   (S V M )   a nd   R e i n f o r c e m e nt   L e a rni n g ,   w hi c ha v e   s h o w p r o m i s e   i i m p ro v i ng   t h e   a c c u ra c y   o f   g l uc o s e   f o r e c a s t s .   T he s e   s t ud i e s   u nde rs c o r e   t he   p o t e nt i a l   o f   i nt e g ra t i ng   s o p hi s t i c a t e d   c o m pu t a t i o na l   m o de l s   w i t t ra d i t i o na l   CG M   s y s t e m s   t o   e nha n c e   p r e d i c t i v e   a c c u ra c y   a nd   p a t i e nt   o u t c o m e s .   R e c e n t   a dv a n c e m e nt s   i a rt i f i c i a l   i nt e l l i ge n c e ,   p a r t i c ul a rl y   i m a c hi n e   l e a rni n g   a nd   de e l e a rn i ng,   ha v e   l e t o   p r o g r e s s   i CG M   p r e di c t i o a l go ri t hm s .   T h e s e   a dv a n c e m e nt s   ha v e   t u rn e d   s uc a l go ri t hm s   i nt o   a   fo c a l   po i n t   o f   r e s e a r c i d i a b e t e s   m a n a ge m e nt   [16] - [21] .   T he   T - L S T M   m o de l   ha s   e xc e pt i o na l   c a p a b i l i t i e s   i pa r a l l e l   p r o c e s s i n g,   ha ndl i ng   l o ng - r a nge   de pe n de n c i e s ,   a n d   a da p t a b i l i t y   a c r o s s   v a r i o us   do m a i n s ,   m a ke   i t   a i n t ri gui ng   o pt i o f o r   t h i s   a ppl i c a t i o [2 2],   [2 3].   T h i s   s t udy   i nt r o duc e s   a   n o v e l   a pp r o a c h ,   e m p l oy i n g   t h e   T - L S T M   m o de l   t o   f o r e c a s t   f ut u r e   b l o o gl uc o s e   l e v e l s .   T h e   m o de l   i s   de s i g n e t o   b e   pa t i e n t - s pe c i f i c ,   a d a pt i n g   a n i m p r o v i ng  o v e r   t i m e   t o   m a t c h   t h e   i ndi v i dua l ' s   m e t a b o l i c   c ha r a c t e r i s t i c s .   T h e   ke y   c o n t ri b ut i o n   o f   t hi s   a r t i c l e   i s   t h e   de v e l o pm e n t   o f   t h i s   i nn o v a t i v e   c o m b i n e d   T - L S T M   m o de l ,   a i m i n g   t o   p r e di c t   gl uc o s e   l e v e l s   fo r   upc o m i n g   i n t e r v a l s   o f   15,   3 0,   a nd   45   m i n ut e s .   D e s pi t e   t h e s e   a dv a n c e m e nt s ,   c ha l l e nge s   pe r s i s t   i a c hi e v i n g   hi g h - p r e c i s i o g l uc o s e   pr e di c t i o n s   a c r o s s   di v e r s e   p a t i e nt   po pul a t i o n s .   V a ri a b i l i t y   i i ndi v i du a l   r e s po n s e s   n e c e s s i t a t e s   pe r s o n a l i z e m o de l i n g   a pp r o a c h e s .   A dd i t i o na l l y ,   t h e   i n t e r p r e t a b i l i t y   o f   m a c h i n e   l e a rn i ng  m o de l s   r e m a i n s   a   c ri t i c a l   c o n c e rn ,   e s pe c i a l l y   w h e n   t h e y   i n f o r m   t h e ra pe ut i c   de c i s i o n s .   S t ud i e s   h a v e   hi g hl i g ht e t h e   i m po rt a n c e   o f   m o de l   i n t e r p r e t a b i l i t y   i di a b e t e s   m a n a ge m e nt ,   e m p ha s i z i n g   t ha t   u n de r s t a n di ng  t h e   ra t i o n a l e   b e h i nd  m o de l   p r e di c t i o n s   i s   c r uc i a l   f o r   p a t i e nt   s a f e t y   a n d   t rus t .   T h i s   s t u dy   i nt r o duc e s   a   n o v e l   D E   a l go r i t hm   o pt i m i z e d   t r a n s f o r m e a n d   T - L S T M   m o de l   t ha t   l e v e r a ge s   t h e   s t r e n g t h s   o f   bo t T ra n s f o r m e a n d   L S T M   t e c hn o l o gi e s .   T h i s   h y b r i m o de l   a i m s   t o   a n a l y z e   hi s t o ri c a l   d a t a   f r o m   CG M   s y s t e m s   m o r e   e ffe c t i ve l y ,   t h e r e by   e nh a n c i ng  t h e   p r e d i c t i o n   o f   f ut ur e   b l o o gl uc o s e   l e v e l s .   By   o pt i m i z i n g   t h e   t i m e   s e ri e s   f o r e c a s t i n g   c a p a b i l i t i e s   o f   t h e   T - L S T M   m o de l   t hr o ug t h e   D E   a l go ri t hm ,   t hi s   r e s e a r c h   s e e ks   t o   pr o v i de   a   m o r e   r e l i a b l e   t o ol   f o r   di a b e t e s   pa t i e nt s   t o   m a na ge   t h e i c o n di t i o pr o a c t i v e l y .   T h e   p ri m a r y   ob j e c t i v e   of   t hi s   r e s e a r c i s   t o   de m o n s t ra t e   t ha t   t h e   D E   i s   o pt i m i z e d .   T h e   T - L S T M   m o de l   c a o ut pe r f o r m   t ra di t i o n a l   p r e di c t i v e   m o de l s   us e i CG M   s y s t e m s .   W e   h y p o t h e s i z e   t ha t   t h e   i n t e g r a t i o o f   T r a n s f o r m e a n d   L S T M   m o de l s ,   o pt i m i z e d   t hr o ugh  a   D E   a l go r i t h m ,   w i l l   p r o v i de   s upe r i o a c c ur a c y   i p r e di c t i n s h o r t - t e rm   gl uc o s e   f l uc t ua t i o n s ,   t h us   s i g n i f i c a n t l y   be n e f i t i ng  d i a b e t e s   m a na ge m e n t .   T h e   pa pe r   i s   o r g a n i z e a s   f o l l ow s :   S e c t i o n   gi v e s   t h e   i nt r o duc t i o n   t o   t h i s   t h e s i s ;   S e c t i o n   2   de t a i l s   t h e   m e t h o do l o g y ,   i n c l ud i n g   t h e   de s c r i pt i o o f   t h e   c l i ni c a l   da t a   us e d,   t h e   t h e o r e t i c a l   f r a m e w o r k   o f   t h e   T - L S T M   m o de l ,   a n t h e   o pt i m i z a t i o p r o c e s s   v i a   t h e   D E   a l go ri t hm .   S e c t i o n   3   p r e s e n t s   t h e   r e s ul t s   o f   t h e   m o de l   t e s t i n g,   i n c l u di n g   a   c o m pa ra t i v e   a n a l y s i s   of   t h e   M S E   v a l ue s   ob t a i n e a g a i n s t   t r a d i t i o na l   m o de l s .   S e c t i o n   4   di s c us s e s   t h e   i m pl i c a t i o n s   o f   t h e s e   r e s ul t s ,   po t e n t i a l   l i m i t a t i o n s   o f   t h e   s t udy ,   a nd   di r e c t i o n s   f o r   f ut u r e   r e s e a r c h.   F i na l l y ,   s e c t i o n   c o n c l ude s   w i t h   a   s u m m a r y   of  f i n di ngs   a nd  t h e i r   i m pl i c a t i o n s   f o r   r e a l - w o r l a ppl i c a t i o n s .       2.   M ET H O D     2. 1 .     C l i n i c a l   d a ta   D a t a   w e r e   c o l l e c t e f r o m   c o n t i n uo us   gl uc o s e   m o n i t o r i n (CG M de v i c e s .   A   s l i di ng  w i n dow   t e c hn i q ue   w a s   a pp l i e t o   s e gm e nt   t h e   t i m e - s e ri e s   da t a   i nt o   i n p ut - o ut pu t   p a i r s   s ui t a b l e   f o r   m o de l i n g .   T h e   da t a s e t   w a s   t h e di v i de d   i nt o   t r a i n i ng,   v a l i da t i o n ,   a n d   t e s t   s e t s   t o   e n s u r e   r o b us t   m o de l   e v a l u a t i o n.   T h e   da t a   Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   40 ,   N o .   1 ,   O c t o b e r   20 25 530 - 5 44   532   ha s   b e e n   a ut h o r i z e by   t h e   D e pa r t m e n t   o f   E n do c ri n o l o g y   a t   T h e   A f f i l i a t e d   S uz h o H o s pi t a l   o f   N a n j i ng  M e di c a l   U ni v e r s i t y ,   l o c a t e i S uz h o M u n i c i p a l   H o s pi t a l ,   S uz h o u,   C h i na .     T h e   2023  A D C   di a b e t e s   di a g n o s i s   a n d   t r e a t m e n t   s t a nda r ds   s t a t e   t ha t   f o r   n o n - p r e g n a nt   a du l t s   w i t h o ut   s i g n i f i c a n t   h y p o gl y c e m i a ,   t h e   i de a l   G l y c a t e h e m o gl o b i ( A 1C)  t a r ge t   s h o ul b e   b e l ow   7%  (53  m m o l / m o l )   [24] - [26] .   A n   A 1C   l e v e l   a b ove   7%  i s   c o n s i de r e a b n o rm a l .   A s   s h o w n   i T a b l e   1,   f o r   t h e   pu r po s e   of   t h i s   r e s e a r c h,   8   pa t i e n t s   f r o m   t h e   D e pa rt m e n t   o f   E n do c r i n o l o g y   a t   S uz h o M u n i c i p a l   H o s pi t a l   i n   J i a n gs u   P r o v i n c e ,   C hi n a ,   w e r e   s e l e c t e d.   T h e s e   pa t i e nt s ,   a l l   u nde 18   y e a r s   o l d,   ha d   A 1C  l e v e l s   e xc e e di n 7. 0 %,   w e r e   di a g n o s e w i t T y pe   D i a b e t e s   M e l l i t us   (T 1D M )   a s   pe A D A   gu i de l i n e s ,   a n d   w e r e   us i ng   a   CG M   s y s t e m .   T h i s   s t udy   a i m s   t o   de m o n s t r a t e   t h e   e ff e c t i v e n e s s   of   t h e   T - L S T M   m o de l   i c o m pa r i s o t o   t r a d i t i o n a l   m o de l s .   P a t i e n t   da t a   c o n f i de n t i a l i t y   w a s   m a i nt a i n e b y   e x c l udi n pe r s o na l   i de n t i f i e r s   l i ke   na m e s ,   a ge s ,   a nd  h o s pi t a l   s t a y   dura t i o n ,   a nd  e xc l udi ng  d a t a   f r o m   pa t i e n t s   w i t h   a t y pi c a l   ge s t a t i o na l   di a b e t e s   o r   t h o s e   w h e xpe r i e n c e da t a   t ra n s m i s s i o n   l o s s   dur i ng  t h e   CG M   p r o c e s s .   E a c h   p a t i e nt   u n de r w e n t   a   gl uc o s e   t o l e r a n c e   t e s t   upo n   h o s pi t a l   a dm i s s i o n .   T h e   pa t i e n t s '   A 1C   l e v e l s   a n d   i s l e t   f un c t i o l o s s   s t a t us e s   v a ri e d,   w hi c h   w a s   i nt e g r a l   fo r   m o de l   v a l i d a t i o n.   T h e   m e t h o do l o g y   i n v o l ve s   a l go r i t hm i c a l l y   di v i di n pa t i e n t s ’  d a t a   i nt o   t r a i n i ng  a nd  t e s t i n s e t s   a n d   s e t t i n g   a   t hr e s h o l t o   o pt i m i z e   t h e   a l go ri t hm   m o de l .       Tab l e   1 .   T h e   s t a n da rds   f o r   d a t a   c h o o s i n g   Re s e a rc h   s t a n d a rd s   2 0 2 3   A D d i a b e t e s   d i a g n o s i s   a n d   t r e a t m e n t   s t a n d a r d s   A 1 T a rg e t   < 7 %   (5 3   m m o l / m o l )   f o r   n o n - p re g n a n t   a d u l t s   P a t i e n t   S e l e c t i o n   Cri t e ri a   L o c a t i o n :   D e p a rt m e n t   o E n d o c ri n o l o g y ,   S u z h o u   M u n i c i p a l   H o s p i t a l ,   J i a n g s u   P ro v i n c e ,   Ch i n a .   A g e   Be l o w   1 8   y e a r s .   A 1 L e v e l   > 7 . 0 % .   Co n d i t i o n   D i a g n o s e d   w i t h   T 1 D M   a s   p e A D A   g u i d e l i n e s .   M o n i t o r i n g   S y s t e m   U s i n g   CG M .   D a t a   Co n f i d e n t i a l i t y   E x c l u s i o n   o p e r s o n a l   i d e n t i f i e r s   a n d   s p e c i fi c   p a t i e n t   c o n d i t i o n s .   P a t i e n t   A s s e s s m e n t   G l u c o s e   t o l e ra n c e   t e s t   u p o n   a d m i s s i o n ;   v a r y i n g   A 1 C   l e v e l s   a n d   i s l e t   f u n c t i o n   l o s s   s t a t u s e s .       2. 2 .     Tr an s fo r m e r - LS TM   th e o r y   an d   fo r m u l a   F i gu r e   1   de pi c t s   a   c o m po s i t e   m a c h i n e   l e a rni n g   a r c h i t e c t ur e ,   i n t e g r a t i ng   t h e   f un c t i o n a l i t i e s   o f   L S T M   n e t w o r ks   t o   c r e a t e   a   h y b r i T - L S T M   m o de l .   T h i s   i nn o v a t i v e   m o de l   f r a m e w o r i s   di v i de i nt o   t w o   s u bc l a s s e s   de r i v e f r o m   t h e   ` nn. M o dul e `   a nd   ` m o de l   B a s e `:   t h e   T ra n s f o r m e m o de l   s ub c l a s s   a nd   t h e   L S T M   m o de l   s ub c l a s s .   T h e   T ra n s f o r m e r   m o de l   s ub c l a s s   i s   i n t ri c a t e l y   de s i gn e d ,   f e a t u r i n g   a   s e r i e s   o f   c o m po n e n t s   i n c l ud i n e n c o de r ,   de c o de r ,   p r o j e c t i o n   h e a d ,   a nd  l i n e a r   l a y e r ,   w h i c h   c o l l e c t i v e l y   c o n t ri b ut e   t o   i t s   r o b us t   e n c o di n c a pa b i l i t i e s .   Co m p l e m e n t i ng  t hi s ,   t h e   L S T M   m o de l   s ub c l a s s   e xt e n ds   t h e   f un c t i o n a l i t i e s   o f   t h e   T ra n s f o r m e m o de l   by   i n c o r po r a t i ng   a L S T M   l a y e r ,   w hi c h   e nha n c e s   t h e   m o de l ' s   a b i l i t y   t o   ha n d l e   s e que nt i a l   d a t a   e ffe c t i ve l y .   B o t h   s ub c l a s s e s   a r e   e qui p pe w i t f o r w a r d   m e t h o d,   e n a b l i ng   f o r w a r d   p r o pa ga t i o t hr o ug t h e   n e t w o r a n d   f o r   c o m put i ng  o ut pu t s .   T h e   c o n s t r uc t o r s   w i t h i t h e s e   s ub c l a s s e s   a r e   p a r a m e t e r - r i c h ,   p r o v i di n g   v e r s a t i l i t y   i m o de l   c o n f i gu r a t i o n.   T h e s e   p a ra m e t e r s ,   i np ut   e m b e ddi n g ,   po s i t i o n a l   e n c o di n g   l a y e r s ,   a nd  dr o po ut   ra t e s ,   a r e   c r i t i c a l   f o r   t a i l o ri n g   t h e   m o de l   t o   t h e   s pe c i fi c   c ha r a c t e r i s t i c s   o f   t h e   da t a s e t   b e i n a na l y z e d.     M o de l   a r c hi t e c t u r e :   T h e   T - L S T M   n e t w o r i s   de s i g n e d   t o   c a pt u r e   t e m po r a l   de pe n de n c i e s   i gl uc o s e   time - s e r i e s   da t a .   T h e   a r c hi t e c t u r e   c o n s i s t s   o f   m ul t i pl e   L S T M   l a y e r s   w i t h   a   s pe c i f i e n u m b e r   o f   m e m o r y   uni t s ,   o pt i m i z e t o   b a l a n c e   m o de l   c o m pl e xi t y   a n d   pe r f o r m a n c e .   P r e v i o us   s t udi e s   ha v e   i de n t i f i e t h a t   a o pt i m a l   num b e o f   m e m o r y   un i t s   e nh a n c e s   p r e di c t i o n   a c c ura c y   w i t h o ut   l e a d i n g   t o   o v e r f i t t i n g.     In c o r po r a t i n g   T ra n s f o r m e r   m e c h a ni s m s   a l l o w s   t h e   m o de l   t o   foc us   o n   di f f e r e n t   t i m e   s t e ps   i t h e   i n put   s e que n c e ,   c a p t u ri n g   gl o b a l   de pe n de n c i e s   a n d   i m p r o v i n g   p r e d i c t i o a c c ura c y .   T h e   s e l f - a t t e n t i o m e c h a ni s m   e n a b l e s   t h e   m o de l   t o   w e i gh  t h e   i m po r t a n c e   o f   v a ri o us   i n pu t   f e a t u r e s   dy n a m i c a l l y .   T - L S T M   m o de l   u ni que l y   i n t e g r a t e s   t h e   c a pa b i l i t i e s   o f   bo t T r a n s f o r m e a n d   L S T M   m o de l s :   t h e   T r a n s f o r m e i s   a de pt   a t   p r o c e s s i n g   l o n g - t e rm   de pe n de n c i e s ,   w hi l e   t h e   L S T M   e xc e l s   i m a na g i n g   s h o rt - t e rm   de pe n de n c i e s .   T h i s   c o n t ra s t s   w i t o t h e m o de l s   t ha t   t y pi c a l l y   r e l y   s o l e l y   o n   e i t h e L S T M   o CN N   a r c hi t e c t u r e s .   D e s pi t e   i t s   i nn o v a t i v e   a pp r o a c h ,   t h e   T - L S T M   a l go r i t h m   ha s   n o t   b e e n   d i r e c t l y   c o m pa r e t o   o t h e m o de l s   i e x i s t i n g   r e s e a r c h   [27] ,   [28] .   T h e   m o de l   i s   de s i g n e f o r   i m m e di a t e ,   s h o rt - t e rm   (w i t h i 1   h o u r )   gl uc o s e   pr e di c t i o n s   i T y pe   di a b e t e s   pa t i e n t s ,   w h i l e   o t h e r   m o de l s   a r e   u t i l i z e f o r   di f fe r e nt   t a s ks   o r   p a t i e nt   gr o up s .   T h e   c h o i c e   of   a   s ui t a b l e   de e l e a rni n m o de l   f o r   gl uc o s e   pr e di c t i o n   i s   c o nt i n ge nt   upo n   t h e   s pe c i f i c   t a s k   r e qui r e m e n t s   a n d   t h e   a v a i l a b l e   d a t a .   T h e   T - L S T M   m o de l   a l go ri t hm   i s   p a r t i c ul a rl y   e ff e c t i v e   fo r   s h o rt - t e rm   p r e di c t i o n s ,   w h e r e a s   o t h e m o de l s   m a y   b e   m o r e   a p p ro pr i a t e   f o l o n ge r - t e r m   f o r e c a s t s   o f o r   us e   w i t h   di f fe r e nt   de m o g r a p h i c   g r o ups .   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       P r e di c t   g l uc os e   v al ue s   w i t D E   a l gor i t hm   opt i m i z e T - L ST M   ( Q i ngX i ang  B i an )   533       F i g u r e   1 .   T h e   a r c hi t e c t u r e   o f   T - L S T M   a l go ri t hm       T h e   u n de r l y i n g   c o n c e pt   o f   t h e   h y b r i t ra n s f o r m e r   m o de l   i s   i t s   a b i l i t y   t o   i n t e r p r e t   gl uc o s e   da t a   a s   a   s e que n c e   of   a t t ri b ut e s ,   l i ke   t i m e   a n d   gl uc o s e   l e v e l s .   T h e   T r a n s f o r m e c o m po n e nt   i s   de s i g n e t o   a na l y z e   t h e   i n t e rr e l a t i o n s hi ps   a m o n t h e s e   a t t r i b ut e s ,   w h i l e   t h e   L S T M   f o c us e s   o n   e xt r a c t i ng  l o c a l i z e f e a t u r e s   f r o m   t h e   da t a .   T h e   o ut put s   f r o m   b o t m o de l s   a r e   t h e n   m e r ge t o   f o r e c a s t   s ub s e que n t   gl uc o s e   l e v e l s .   T h e   m a t h e m a t i c a l   f o r m u l a t i o f o r   t h e   T - LS T M   m o de l   i s   p r e s e n t e a s   ( 1) :     = ( [ 1 , ] +   )   (1)     T h e   c o m po n e nt s   o f   t h e   e qua t i o a r e   de f i n e a s   f o l l ow s :     r e p r e s e n t s   t h e   f o r ge t   g a t e ,   1   de n o t e s   t h e   o ut put   s t a t us   o f   t h e   p r e v i o us   n o de ,       i s   t h e   i n p ut   a t   t h e   c u rr e nt   m o m e nt ,     i s   t h e   s i g m o i a c t i v a t i o f un c t i o n ,       a n d     i s   t h e   l e a rn   ra t e   pa ra m e t e r s .     = ( [ 1 , ] +   )   (2)     ̃ = ( [ 1 , ] +   )   (3)     T h e   a r c h i t e c t ur e   f e a t u r e s   a n   i n pu t   g a t e   t ha t   de t e rm i n e s   t h e   r e l e v a n c e   of   t h e   c u rr e nt   g l uc o s e   i n put   w i t h i t h e   b r o a de c o n t e xt .   W h e t h e   i n pu t   ga t e   i s   a c t i v a t e d,   i t   e n a b l e s   t h e   m o de l   t o   di s r e ga rd  t h e   c u rr e n t   gl uc o s e   i n pu t ,   t h e r e by   pr e v e n t i ng  t h e   t r a n s m i s s i o n   o f   t h i s   i n put   i n f o r m a t i o t o   s ub s e que n t   n o de s   o t i m e   s t e ps .   T h e   i n pu t   g a t e   i s   c o m po s e of   t w o   s e gm e n t s ,   e a c a c t i v a t e d   by   di s t i n c t   a c t i v a t i o f u n c t i o n s :   t h e   s i gm o i f u n c t i o a n d   t h e   t a nh  f u n c t i o n,   r e s pe c t i v e l y .     Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   40 ,   N o .   1 ,   O c t o b e r   20 25 530 - 5 44   534   = 1 + ̃   (4)     T h e     v a r i a b l e   i n   t h e   m o de l   s e r v e s   a   c r uc i a l   r o l e   i n   r e t a i ni n g   b o t h   p r e v i o us   a n c u rr e n t   r e l a t e d   i n f o r m a t i o n,   p r e s e r v i n g   i t   o v e r   e xt e n de s e que n c e s .   T hi s   c a pa b i l i t y   e ff e c t i v e l y   a ddr e s s e s   t h e   c h a l l e n ge   o l o n g - d i s t a n c e   de pe n de n c i e s   w i t h i t h e   d a t a .   O n c e     i s   u pda t e d,   t h e   i n f o r m a t i o i s   s u b s e que n t l y   pr o pa g a t e d   t o   t h e   n e xt   n o de   o r   t i m e   s t e p.       = ( [ 1 , ] +   )   (5)     = ( )     (6)     T h e   f un c t i o n   o f   t h e   o ut put   g a t e ,   a s   de l i n e a t e by   fo r m ul a s   5   a n d   6 ,   i s   t o   de l i v e r   t h e   f i na l   c o n t e n t   o t h e   m o de l .   T h i s   o ut pu t   i s   de ri v e f r o m   v a ri a b l e s   1   a n d   .   A ddi t i o n a l l y ,   f o r m u l a   (6)   i n c o r po ra t e s   a   f i l t e r i ng  m e c h a ni s m     ;   t hi s   m e c h a ni s m   e v a l u a t e s   t h e   u t i l i t y   of  t h e   i n f o r m a t i o n   c o nt a i n e i   ,   a l l o w i n t h e   ga t e   t o   s e l e c t i v e l y   o ut put   i n f o rm a t i o de e m e us e f ul   w h i l e   di s c a r d i n w h a t   i s   c o n s i de r e n o n - e s s e n t i a l .     y   =   f   ( x ,      )   (7)     In  t h e   s pe c i f i e m o de l ,   y   r e pr e s e nt s   t h e   f o r e c a s t i n g   g l uc o s e   v a l ue s ,   w hi l e   de n o t e s   t h e   i nput   gl uc o s e   s e t s .   F ur t h e rm o r e ,   W   i s   i de nt i f i e a s   t h e   w e i g h t   m a t ri f o r   t h e   T r a n s f o r m e m o de l ,   a n d   W   ,   w h i c h   s e r v e s   a s   t h e   w e i ght   m a t r i x   f o r   t h e   L S T M   m o de l .     By   ut i l i z i ng   pa s t   da t a ,   gl uc o s e   p r e di c t i o a t t e m pt s   t o   f o r e c a s t   f ut u r e   g l uc o s e   l e v e l s .   T h e   T - L S T M   m o de l   e m e r ge s   a s   a   po t e n t   s o l ut i o n   f o r   t hi s   t a s k,   s y n t h e s i z i ng  t h e   s t r e n g t h s   o f   bo t h   a r c hi t e c t u ra l   f r a m e w o r ks .   T h e   T ra n s f o r m e m o de l   e xc e l s   i c a pt u ri n g   l o ng - r a nge   de p e n de n c i e s   due   t o   i t s   s e l f - a t t e n t i o n   m e c ha n i s m s ,   w h i c a l l o w s   i t   t o   e xa m i n e   di f f e r e n t   t i m e   s t a ge s   w i t h i t h e   i n p ut   s e que n c e .   T hi s   a b i l i t y   i s   h e l pf ul   i i de nt i fy i n g   i nt r i c a t e   r e l a t i o n s h i ps   a nd  p a t t e rn s   f o un i gl u c os e   da t a .   O t h e   o t h e ha n d ,   t h e   L S T M   i s   a a r c hi t e c t u r e   o f   RN N   t ha t   i s   w e l l - k n o w n   f o r   i t s   e f fe c t i ve n e s s   a t   m o de l l i ng  s e que nt i a l   da t a .   T h e   m e m o r y   c e l l   t h a t   a l l o w s   f o r   t h e   s t o r a ge   a n r e t ri e v a l   o f   i n f o r m a t i o n   a c r o s s   e xt e n de s e que n c e s .   T hi s   f e a t u r e   i s   e s pe c i a l l y   us e f ul   fo r   c a pt u r i n g   t h e   t e m po r a l   r e l a t i o n s h i ps   t y pi c a l   o f   gl uc o s e   t i m e   s e r i e s .     2. 3 .     D al go r i th m   o p ti m i z e s   T - LS T M     A.   O pt i m i z a t i o w i t h   DE   a l go r i t h m   T h e   D E   a l go r i t hm   i s   e m p l oy e t o   o pt i m i z e   t h e   h y pe r pa r a m e t e r s   o f   t h e   T - L S T M   n e t w o r k,   i n c l u di n g   t h e   n u m b e o f   m e m o r y   uni t s ,   l e a rn i ng   r a t e ,   a n d   b a t c s i z e .   D E ' s   po pul a t i o n - b a s e s e a r c s t ra t e gy   e ff e c t i ve l y   e xpl o r e s   t h e   h y pe r pa ra m e t e s pa c e ,   a i m i ng  t o   f i nd  t h e   o pt i m a l   c o n f i gura t i o t ha t   m i ni m i z e s   p r e d i c t i o e rr o r.   T h i s   o pt i m i z a t i o p r o c e s s   e n ha n c e s   t h e   m o de l ' s   a b i l i t y   t o   ge ne r a l i z e   a c r o s s   di v e r s e   pa t i e n t   da t a .   B.   M o de l   t ra i ni n g   a nd  e v a l u a t i o n   T h e   o pt i m i z e T - L S T M   m o de l   i s   t r a i n e us i n g   t h e   A da m   o pt i m i z e w i t a   m e a s q ua r e d   e rr o r   (M S E l o s s   f un c t i o n.   P e r f o r m a n c e   i s   e v a l ua t e us i ng  m e t ri c s   s uc h   a s   r o o t   m e a s qu a r e   e rr o (R M S E a n m e a a b s o l ut e   pe r c e n t a ge   e rr o (M A P E ) .   C r o s s - v a l i da t i o t e c hn i q ue s   a r e   e m p l oy e t o   a s s e s s   t h e   m o de l ' s   r o b us t n e s s   a nd  p r e v e n t   o v e r f i t t i n g .   C.   Co m pa r i s o w i t h   e x i s t i ng  m o de l s   T h e   p r o po s e h y b r i m o de l ' s   pe r f o r m a n c e   i s   c o m pa r e d   w i t t ra d i t i o n a l   m o de l s   l i ke   a u t o r e g r e s s i v e   i n t e g r a t e m o v i n g   a v e r a ge   (A R IM A a n o t h e r   m a c h i n e   l e a r ni n m o de l s ,   i n c l u di n g   s uppo rt   v e c t o r   r e g r e s s i o n   (S V R a n d   r e c urr e nt   n e u r a l   n e t w o r ks   (R N N s ).   S t u di e s   h a v e   de m o n s t r a t e t ha t   i nt e g r a t i n g   D E   w i t h   L S T M   n e t w o r ks   i m p r o v e s   pr e di c t i o a c c ur a c y   ov e r   s t a n d a r d   m o de l i n g   a pp r o a c h e s .   T h e   D E   a l go r i t h m   ge n e ra t e s   po pul a t i o n   i ndi v i du a l s   by   e n c odi n w i t f l o a t i n po i nt   v e c t o r s .   I n   t h e   pr o c e s s   of   D E   a l go r i t hm   o pt i m i z a t i o n,   f i r s t ,   s e l e c t   t w o   i n d i v i dua l s   f r o m   t h e   pa r e n t   i n d i v i dua l s   a n d   pe r f o r m   v e c t o r   di f f e r e n c e   t o   ge n e r a t e   a   d i f f e r e n c e   v e c t o r ;   s e c o n dl y ,   s e l e c t   a n o t h e i ndi v i dua l   a nd  s u m   t h e   di f f e r e n c e   v e c t o r   t o   ge n e ra t e   a e xpe ri m e n t a l   i ndi v i dua l ;   t h e n,   c o m pa r e   t h e   p a r e nt   i n d i v i dua l s   w i t h   t h e   c o rr e s po n d i n e xpe r i m e nt a l   i n d i v i dua l s   u n de r go   a   c r o s s ove r   o pe r a t i o n   t o   ge n e r a t e   n e w   off s pr i n i n d i v i dua l s ;   f i n a l l y ,   a   s e l e c t i o n   o pe r a t i o i s   pe r f o r m e b e t w e e pa r e nt   i n d i v i dua l s   a nd   o ff s pr i n g   i ndi v i du a l s ,   a n d   i n d i v i dua l s   t h a t   m e e t   t h e   r e qu i r e m e n t s   a r e   s a v e t o   t h e   n e xt   ge n e ra t i o n   g r o up.   T h e   f o r m u l a t i o c a b e   e xpr e s s ed   a s :     Mi ( 1 2 ,   . . . ,   )   (8)     s . t     ,   j   =   1 , 2,   ,   D   (9)   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       P r e di c t   g l uc os e   v al ue s   w i t D E   a l gor i t hm   opt i m i z e T - L ST M   ( Q i ngX i ang  B i an )   535   W h e r e ,   D   r e p r e s e nt s   t h e   d i m e n s i o n   o f   t h e   s o l ut i o n   s p a c e ,     a n   r e s pe c t i v e l y   r e pr e s e n t   t h e   U ppe r   a n L ow e r   l i m i t a t i o n s   o n   t h e   v a l ue   ra n ge   o f   t h e   j - t c o m po n e n t   .   A s   s h o w n   i n   F i g u r e   2,   t h e   f l ow c h a rt   i l l us t r a t e s   t h e   o pt i m i z a t i o n   p r o c e s s   of   a   T - L S T M   m o de l   f o r   gl uc o s e   pr e di c t i o us i n g   t h e   DE   a l go ri t hm ,   b e gi nni n w i t Ini t i a l i z a t i o n   w h e r e   a   di v e r s e   po pul a t i o n   o f   1   t 50  s o l ut i o n s   i s   ge n e ra t e d,   e a c de f i n e by   s pe c i f i c   h y p e r pa r a m e t e r s   s uc h   a s   a   l e a rni n ra t e   ra n gi ng  f r o m   0. 001  t o   0. 01 ,   t o   L S T M   l a y e r s ,   hi dde n   l a y e r   s i z e s   b e t w e e n   50  a n 2 00  u ni t s ,   a   d r o po ut   r a t e   o f   0. t o   0. 5,   a n d   a   b a t c s i z e   f r o m   32   t o   12 8.   I t h e   M ut a t i o n   s t e p,   m ut a n t   v e c t o r s   a r e   c r e a t e d   by   a dj us t i n t h e s e   h y pe r pa r a m e t e r s   us i ng   a   s c a l i ng  f a c t o b e t w e e n   0 . a n d   0. 8 ,   a ppl i e t o   di f f e r e n c e s   b e t w e e n   ra n do m l y   s e l e c t e s o l ut i o n   p a i r s ,   i n t r o duc i n g   v a ri a b i l i t y .   T h e   C r o s s ov e r   p h a s e   m i xe s   t h e s e   m u t a nt s   w i t h   o ri gi na l   v e c t o r s   a t   a   c r o s s ove r   ra t e   o f   0. 7   t o   0. 9 ,   e f fe c t i ve l y   b l e n di ng  t r a i t s   t o   po t e n t i a l l y   e nh a n c e   s o l ut i o e f f i c a c y .   S e l e c t i o n   e v a l ua t e s   t h e s e   n e w   c o n f i gu r a t i o n s   v i a   t h e   M S E   f i t n e s s   f un c t i o n,   c h o o s i n t h o s e   w i t l o w e r   M S E   fo r   p r o gr e s s i o n,   t h e r e by   o pt i m i z i n g   p r e di c t i v e   a c c u r a c y .   If   t h e   C h e c Co n v e r ge n c e   c ri t e r i a   o f   a   m a xi m u m   o f   100  t o   200   ge n e ra t i o n s   o a M S E   t hr e s h o l a r e   n o t   m e t ,   t h e   p r o c e s s   c y c l e s   a ga i f r o m   m ut a t i o n ,   e l s e   i t   c o n c l ude s   w i t F i na l i z e   M o de l ,   w h e r e   t h e   T - L S T M ’s   h y pe r pa r a m e t e r s   a r e   f i n e - t u n e d   a nd  r e a dy   fo r   de pl oy m e n t ,   e n s u ri n g   t h e   m o de l ’s   c a pa b i l i t y   t o   p r o v i de   p r e c i s e   gl uc o s e   l e v e l   fo r e c a s t s   e s s e n t i a l   f o r   e f fe c t i ve   di a b e t e s   m a n a ge m e nt .   T h e   f l o w c h a r t   de t a i l s   t h e   o pt i m i z a t i o n   o f   p r o po s e d   T - L S T M   m o de l   us i ng  t h e   DE   a l go ri t hm   f o r   gl uc o s e   pr e di c t i o n.   I t   s t a r t s   by   i ni t i a l i z i n g   a   p o pul a t i o n   w i t s pe c i f i c   h y pe r pa r a m e t e r s ,   w hi c a r e   t h e n   r e f i n e t hr o ug h   m ut a t i o n   a nd  c r o s s ove r   s t e ps   b a s e o n   pe r f o r m a n c e   m e a s u r e by   MSE .   T hi s   i t e ra t i v e   pr o c e s s   c o n t i n ue s   u nt i l   c o n v e r ge n c e   c ri t e r i a   a r e   m e t ,   r e s ul t i n i n   a   f i n e l y   t un e m o de l   o pt i m i z e f o r   a c c ur a t e   gl uc o s e   fo r e c a s t i n g ,   e nha n c i n g   di a b e t e s   m a na ge m e nt .           F i g u r e   2 .   D E   o pt i m i z a t i o n   d i a g ra m       Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   40 ,   N o .   1 ,   O c t o b e r   20 25 530 - 5 44   536   3.   R ES U LTS   A N D   D I S C U S S I O N   3. 1 .     R e s u l ts   o f   M S E   c o m p ar i s o n   T o   e v a l ua t e   t h e   e f f i c a c y   of   t h e   T - L S T M   p r e di c t i o m o de l ,   r e f e r   t o   T a b l e   1 ,   w h i c c o m pa r e s   s i x   m o de l s   ut i l i z e i t hi s   s t udy   b a s e o n   t h e i M S E .   T h e   f o r m u l a   f o r   c a l c ul a t i n g   t h e   MSE   i s   p r o v i de b e l ow :       = 1     = 1 (   ( |    )     ( ) ) 2   (30)     In  t h e   e qu a t i o n ,   Λ ( |    )   r e p r e s e n t s   t h e   f o r e c a s t e gl uc o s e   l e ve l   a t   t i m e   t ,     ( )   de n o t e s   t h e   r e a l   t i m e   m e a s u r e v a l ue   o f   gl uc o s e   a t   t h e   c o rr e s po n di n g   t i m e   t .   T h e   R N N   m a i n t a i n s   m e m o r y   v i a   hi dde n   s t a t e s   w i t h i e a c n o de .   T h e s e   h i d de s t a t e s   f un c t i o n   a s   m e m o r y   un i t s   a nd  a r e   upd a t e w i t h   e a c h   n e w   i n pu t ,   i nt e gra t i n g   i n f o r m a t i o n   f r o m   t h e   c u rr e n t   i n pu t   a s   w e l l   a s   t h e   p ri o h i dde s t a t e .   T hi s   m e c ha n i s m   a l l o w s   t h e   R N N   t o   pr e s e r v e   i n f o r m a t i o f r o m   p r e v i o us   s e que n c e   s t e ps .   I n   t hi s   c o n t e xt ,   t h e   M S E   v a l ue   o v e r   15  m i nut e s   i s   r e c o r de a t   1 . 41 .   A ddi t i o n a l l y ,   t h e r e   a r e   a dv a n c e d   v e r s i o n s   o f   R N N s ,   s uc a s   G R U   a n d   L S T M   n e t w o r ks ,   w h i c e nha n c e   t h e   f o un d a t i o n a l   m o de l .   T h e s e   v e r s i o n s   s o l ve   c o n c e r n s   s uc a s   t h e   v a n i s hi n g   g ra d i e nt   p r o b l e m ,   w h i c c a i nhi b i t   l e a rn i ng   o v e r   l o ng   s e que n c e s .   F o t h e s e   a dv a n c e n e t w o r ks ,   t h e   M S E   v a l ue s   o v e r   15  m i n u t e s   a r e   1. 5 a nd  1 . 75 ,   r e s pe c t i v e l y .   T h e   s t a c ke L S T M   r e p r e s e n t s   a   f ur t h e de v e l o pm e n t   o f   t h e   s t a n d a r d   L S T M   m o de l .   T h i s   m e t h o s t a c ks   m u l t i pl e   L S T M   l a y e r s   a t o e a c o t h e r,   r e s ul t i n g   i a   1 5 - m i n u t e   M S E   v a l ue   o f   1. 69 .   T h e   b i di r e c t i o n a l   L S T M   (B i - L S T M )   us e s   c o n t e xt   f r o m   b o t t h e   p a s t   a n d   t h e   f ut u r e   by   pr o c e s s i n t h e   i n pu t   s e que n c e   f o r w a r ds   a n d   b a c kw a r ds   a t   t h e   s a m e   t i m e .   I t   c o m pri s e s   t w o   di s t i n c t   L S T M   u n i t s :   o n e   p r o c e s s e s   t h e   s e que n c e   f r o m   s t a rt   t o   f i ni s h ,   w hi l e   t h e   o t h e do e s   s o   f r o m   f i n i s t o   s t a rt .   T hi s   a l l o w s   t h e   B i - L S T M   t o   de t e c t   de pe n de n c i e s   i b o t di r e c t i o n s ,   w h i c h   i s   us e f ul   f o r   a ppl i c a t i o n s   l i ke   n a m e e nt i t y   r e c o gn i t i o a nd   s e n t i m e n t   a na l y s i s .   H ow e v e r ,   w h e n   a pp l i e t l e n g t h y   t i m e   s e r i e s   d a t a ,   t hi s   m o de l   a c h i e v e s   a n   M S E   v a l ue   o f   1. 72,   i n d i c a t i n g   s ub o pt i m a l   pe r f o r m a n c e .   B a s e o n   t h e   a n a l y s i s   pr e s e n t e i n   T a b l e   2,   i t   i s   e v i de n t   t ha t   t h e   s i m o de l s '   p r e di c t i o n   a l go ri t hm s   e x h i b i t e v a r y i n g   b e h a v i o r s   w h e a pp l i e d   t o   t h e   g l uc o s e   da t a   o f   t h e   s a m e   p a t i e nt .   N o t a b l y ,   t h e   T ra n s f o r m e r - L S T M   m o de l ,   o pt i m i z e us i n g   a   G e n e t i c   a l go ri t hm ,   de m o n s t r a t e s upe ri o pe r f o r m a n c e   o n   a v e r a ge .   T hi s   w a s   e v i de n t   w h e c o m pa r i n g   t h e   MSE s   c a l c ul a t e f o r   e a c h   p a t i e n t   i n d i v i dua l l y ,   c o n s i s t e n t l y   o ut pe r f o r m i n g   t h e   t r a d i t i o n a l   m o de l s .   Co n s e que n t l y ,   t h e   D E   o pt i m i s e T - L S T M   m o de l   i s   m o r e   c a p a b l e   o f   f o r e c a s t i n g   gl uc o s e   v a l ue s   w h i c s ugge s t i ng  i t s   e nha n c e s ui t a b i l i t y   fo r   a p pl i c a t i o n s   i t hi s   do m a i n.   W h e n   b e n c hm a rke a g a i n s t   t ra d i t i o n a l   m o de l s   s uc h   a s   A R IM A   a n SVR ,   a s   w e l l   a s   o t h e m a c hi n e   l e a rn i ng  m o de l s   l i ke   c o n v o l ut i o n a l   r e c urr e nt   n e u r a l   n e t w o r ks   (CR N N ),   t h e   p r o po s e h y b r i m o de l   de m o n s t r a t e d   s upe ri o pe r f o r m a n c e .   F o i n s t a n c e ,   s t udi e s   ha v e   r e po rt e t ha t   CN N - L S T M   a r c hi t e c t u r e s   c a a c hi e v e   up  t o   94 . 71%   a c c ur a c y   i p r e d i c t i n g   g l uc o s e   l e v e l s   a t   a   90 - m i n u t e   h o ri z o n   [29] S i m i l a r l y ,   m o de l s   i n t e g r a t i ng   T ra n s f o r m e c o m po n e n t s   ha v e   s h o w n   i m p r o v e p r e d i c t i o a c c ura c y   by   e f fe c t i ve l y   c a pt u r i n g   gl o b a l   de pe n de n c i e s   i t i m e - s e ri e s   da t a   [30] .   F i gu r e   d i s pl a y s   a   15 - m i n u t e   f o r e c a s t   r e s ul t   o f   gl uc o s e .   T h e   b l a c da s h e l i n e   r e p r e s e n t s   t h e   a c t u a l   c h a nge s   i n   gl uc o s e   l e ve l s ,   w h i l e   t h e   r e d a s h e l i n e   i n di c a t e s   t h e   f o r e c a s t e gl uc o s e   v a l ue s .   T h e   T r a n s f o r m e r - L S T M   a l go ri t hm ,   a s   de m o n s t r a t e h e r e ,   c a p r e di c t   f ut u r e   gl uc o s e   c ha n ge s   w i t c o n s i de ra b l e   a c c ur a c y ,   c l o s e l y   a l i gni n g   w i t h   t h e   r e a l   g l uc o s e   f l uc t ua t i o n s .   T h e   T - L S T M   m o de l ' s   p r e di c t i o n s   f o r   t h e   pa t i e n t ' s   b l o o gl u c os e   i 45   m i n u t e s ,   b a s e o t h e   CG M   da t a   o f   s a m pl e   1,   a r e   i l l us t r a t e i F i gu r e s   3 - 5.   T h e   r e d   d a s he l i n e   de pi c t s   t h e   e xpe c t e v a l ue s ,   w h e r e a s   t h e   b l a c da s h e d   l i n e   r e p r e s e n t s   t h e   a c t u a l   gl uc o s e   l e v e l s .   W h e t h e   t hr e e   num b e r s   a r e   c o m pa r e d ,   t h e   f o r e c a s t s '   a c c ur a c y   de c r e a s e s   a s   t h e   p r e di c t i o n   i n t e r v a l   i s   l a r ge r .   I n   o t h e r   w o r ds ,   t h e   a s s o c i a t i o b e t w e e n   a c c ura c y   a n d   fo r e c a s t   pe r i o du ra t i o h a s   de c r e a s e s i g ni f i c a n t l y .   F i gu r e   6   i l l us t ra t e s   t h e   p r o c e s s   of   K - F o l c r o s s - v a l i da t i o n ,   a   m e t h o us e d   t o   a s s e s s   a   m o de l ' s   pe r f o r m a n c e   o n   a   d a t a s e t   b y   di v i di n g   i t   i nt o   m u l t i pl e   f o l ds ,   a s   i m p l e m e nt e i n   t h e   p r o v i de c o de .   C r o s s - v a l i da t i o e n s u r e s   t ha t   e a c h   da t a   po i n t   h a s   a o ppo r t u n i t y   t o   b e   pa rt   o f   t h e   t ra i ni n g   a n d   t e s t i n g   p ha s e s ,   pr o v i di n g   a   r o b us t   m e a s u r e   o f   m o de l   a c c ura c y   a n r e l i a b i l i t y   a c r o s s   di f fe r e nt   s ub s e t s   o f   da t a .       T a b l e   2 .   M S E   v a l ue s     1 1 5 m i n   3 3 0 m i n   4 4 5 m i n   R NN   1 1 . 4 1   2 2 . 3 4   2 2 . 7 1   G RU   1 1 . 5 0   2 2 . 1 6   2 2 . 5 1   L S T M   1 1 . 7 5   2 2 . 4 3   2 2 . 7 5   S t a c k e d   L S T M   1 1 . 6 9   2 2 . 4 9   2 2 . 7 4   Bi d i re c t i o n a l   L S T M   1 1 . 7 2   2 2 . 5 0   2 2 . 9 0   DE -   T -   L S T M   0 0 . 9 6   1 1 . 5 4   2 2 . 3 1   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       P r e di c t   g l uc os e   v al ue s   w i t D E   a l gor i t hm   opt i m i z e T - L ST M   ( Q i ngX i ang  B i an )   537       F i g u r e   3 .   15   m i n u t e s   f o r e c a s t           F i g u r e   4 .   30   m i n u t e s   f o r e c a s t       In  t hi s   p r o c e s s ,   t h e   da t a s e t   i s   f i r s t   s huf f l e a n d   s pl i t   i n t o   t w o   pr i m a r y   s e t s :   t ra i ni n a n d   t e s t .   T h e   t r a i ni n g   s e t   i s   t h e n   f urt h e di v i de i n t o   K   f o l ds   (h e r e ,   14   f o l ds   i t h e   c o de ),   w h i c h   a l l o w s   t h e   m o de l   t o   b e   t r a i n e d   o n   (K - 1)   f o l ds   a n d   v a l i d a t e d   o t h e   r e m a i ni n g   o n e .   T h i s   r o t a t i o c o n t i n ue s   u n t i l   e a c f o l h a s   s e r v e a s   t h e   v a l i d a t i o s e t   o n c e ,   a n d   t h e   m o de l ' s   pe r f o r m a n c e   i s   a v e r a ge d   a c r o s s   a l l   f o l ds   t o   o b t a i a   f i n a l   s c o r e .   T h e   c o de   a pp l i e s   t h i s   c r o s s - v a l i da t i o t e c hn i q ue   t o   c o m pa r e   t h e   pe r f o r m a n c e   o f   t w o   m o de l s :   T r a n s f o r m e r - L S T M   a nd  A R IM A .   F o e a c h   f o l d,   a   n e w   i n s t a n c e   o f   t h e   T r a n s f o r m e r - L S T M   m o de l   i s   i n i t i a l i z e d,   t r a i n e o n   t h e   t ra i ni n s ub s e t ,   a nd  v a l i da t e o n   t h e   t e s t   s ub s e t   w i t hi n   t h e   f o l d.   T h e   m e a n   l o s s   fo r   e a c h   f o l i s   r e c o r de d   i F i gu r e   7 ,   a n d   r e s ul t s   a r e   v i s ua l i z e a c r o s s   f o l ds   t o   u n de r s t a n d   t h e   m o de l s '   pe r f o r m a n c e   c o n s i s t e n c y   a n d   a c c ura c y .   By   us i n g   K - f o l c r o s s - v a l i da t i o n,   t h e   c o de   e n s u r e s   t ha t   t h e   m o de l   i s   t e s t e o n   a l l   d a t a   po i n t s ,   p r o v i di n a   c o m pr e h e n s i v e   a s s e s s m e nt   o f   i t s   ge n e r a l i z a b i l i t y   a n hi g hl i g ht i ng  a n y   da t a - de pe n de nt   pe r f o r m a n c e   v a ri a t i o n s .   T h i s   i m a ge   c o m pl e m e nt s   t h e   c o de   by   v i s ua l l y   s um m a ri z i n t h e   K - fo l pr o c e s s ,   f r o m   i n i t i a l   da t a s e t   s h uf f l i n t o   s e que nt i a l   f o l e v a l ua t i o n ,   hi g hl i g ht i ng  h o w   t hi s   a p p r o a c pr o v i de s   a   r e l i a b l e   m e a s u r e   o f   m o de l   a c c ur a c y   a n d   ge n e r a l i z a t i o n   a c r o s s   v a r i o us   s ub s e t s   of   da t a .   Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   40 ,   N o .   1 ,   O c t o b e r   20 25 530 - 5 44   538       F i g u r e   5 .   45   m i n u t e s   f o r e c a s t           F i g u r e   6 .   K - f o l de r   c r o s s   v a l i da t i o n       T h e   b o xpl o t   a nd  l i n e   p l o t   i F i gu r e   7 (a )   i n d i c a t e   t ha t   t h e   T r a n s f o r m e r - L S T M   m o de l   m a y   pr o v i de   s l i g h t l y   m o r e   r e l i a b l e   a nd   c o n s i s t e n t   p r e d i c t i o n s   o f   b l oo gl uc o s e   l e ve l s   due   t o   i t s   l o w e r   m e di a l o s s   a nd  s m a l l e IQ R .   H ow e ve r ,   t h e   f o l d - s pe c i f i c   v a r i a t i o n s   i n   F i g ur e   7 (b )   o bs e r v e i n   t h e   l i n e   p l o t   s ugge s t   t h a t   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       P r e di c t   g l uc os e   v al ue s   w i t D E   a l gor i t hm   opt i m i z e T - L ST M   ( Q i ngX i ang  B i an )   539   A R IM A   c a o c c a s i o n a l l y   a c h i e v e   l o w e r   l o s s e s   de pe n di ng  o n   t h e   d a t a   s ub s e t ,   t h o ug i t   i s   l e s s   c o n s i s t e n t   ov e r a l l .   T hi s   c o m pa ra t i v e   a na l y s i s   hi g h l i g h t s   t ha t   T ra n s f o r m e r - L S T M   m a y   b e   a   b e t t e c h o i c e   f o r   ge n e r a l   a ppl i c a t i o n s   i n   b l o o gl uc o s e   pr e di c t i o n   d ue   t o   i t s   b a l a n c e   o f   a c c ur a c y   a n d   s t a b i l i t y .         (a )       (b )     F i g u r e   7 .   Co m p a r i s o o f   m o de l   l o s s e s   us i n g   t w o   v i s ua l i z a t i o m e t h o ds (a )   B o xpl o t   s h o w i n g   t h e   di s t ri b ut i o of   l o s s   v a l ue s   fo r   T - L S T M   a nd  A R IM A   m o de l s   (b L i n e   pl o t   i l l us t ra t i n g   t h e   l o s s   v a l ue s   a c r o s s   14   v a l i d a t i o fo l ds   f o r   b o t h   m o de l s       F i gu r e   8   di s p l a y s   a   l i n e   g ra p r e p r e s e n t i n g   t h e   c ha n ge   i f i t n e s s   a c r o s s   30  i t e r a t i o n s .   T h e   x - a xi s   l a b e l l e " It e r a t i o n, "   ra n ge s   f r o m   t o   30,   i n di c a t i ng  t h e   s e qu e n c e   of   i t e r a t i o n s .   T h e   y - a xi s ,   l a b e l l e " F i t n e s s , "   i s   s c a l e d   f r o m   0 . 96   t o   1. 1 0,   w hi c h   m e a s u r e s   t h e   f i t n e s s   v a l ue .   T h e   l i n e   g ra p s h o w s   a   p r o n o u n c e i ni t i a l   de c r e a s e   i n   f i t n e s s   f r o m   i t e ra t i o t o   i t e ra t i o 8,   a f t e w h i c h   t h e   r e duc t i o i n   f i t n e s s   v a l ue   b e c o m e s   l e s s   s t e e p   a n m o r e   g r a dua l   f r o m   i t e ra t i o n   o n w a r ds ,   e v e n t u a l l y   pl a t e a ui n n e a i t e ra t i o n   22  t hr o ug h   30 .   T h e   v i s ua l   pr e s e nt a t i o s ugge s t s   a   qu i c i n i t i a l   o pt i m i z a t i o f o l l ow e by   a   s l o w e r ,   m o r e   i n c r e m e n t a l   i m p r o v e m e n t   o r   s t a b i l i z a t i o i t h e   f i t n e s s   v a l ue   a s   i t e ra t i o n s   p r o g r e s s .   T h i s   pa t t e rn  c o ul i n di c a t e   t hi s   T - L S T M   a l go r i t h m   a pp r o a c hi n g   a o pt i m a l   s o l ut i o o r   a   l i m i t a t i o n   i n   f u r t h e i m pr o v e m e n t   a f t e s i g ni f i c a nt   i n i t i a l   g a i n s .   A s   s h o w n   i n   T a b l e   3 ,   t h e   i m p r o v e m e n t   a f t e r   30   ge n e ra t i o n s   of   o pt i m i z a t i o n ,   a l l   t h e   r e s ul t s   ha b e e n   o pt i m i z e d .   O a v e ra ge ,   t h e r e ' s   a   s i g n i f i c a n t   r e duc t i o w i t 2 8 i m p r o v e m e n t   i n   M S E   a c r o s s   a l l   p a t i e nt s   po s t - o pt i m i z a t i o n,   i n d i c a t i n g   a   s t r o n g   o v e r a l l   e f f i c a c y   of   t h e   o pt i m i z a t i o p r o c e s s .   W h e a   p a t i e n t ' s   (P a t i e n t   6)   b l o o gl uc o s e   l e ve l s   s t a b i l i z e   a nd  r e m a i w i t h i a   r e l a t i v e l y   n o r m a l   r a nge   o ve r   a   l o n g   pe ri o d,   u s i n t h e   DE   o pt i m i z e m o de l   y i e l ds   b e t t e r   o pt i m i z a t i o r e s ul t s .   T h i s   i n d i c a t e s   t h a t   t h e   D E   o pt i m i z a t i o i s   m o r e   e f f e c t i ve   Evaluation Warning : The document was created with Spire.PDF for Python.