I n t e r n at io n al  Jou r n al  of  A d van c e s  i n  A p p li e d  S c ie n c e s  ( I JA A S )   V ol .  14 , N o.  4 ,  D e c e m be r   20 25 , pp.  1028 ~ 1039   I S S N :  2252 - 8814 ,  D O I :  10.11591/ ij a a s . v14. i 4 . pp1028 - 1039          1028       Jou r n al  h om e page :  ht tp : // ij aas .i ae s c or e .c om   Im p l e m e n t at i on  of  X G B oost  f or  d i ab e t e s m e l l i t u s r i sk   p r e d i c t i on  b ase d  on  h e al t h   h i st or y       A n d i  R ia n s yah 1 ,  G h u f r on 1 , L ai la t u l  F it r iy ah 1 , S u yan t o 2   1 D e pa r t m e nt   o f  I nf or m a t i c s   E ngi ne e r i ng ,  F a c ul t y  o f  I ndus t r i a l   T e c hnol ogy, U ni ve r s i t a s  I s l a m  S ul t a n A gung, S e m a r a ng, I ndone s i a   2 F a c ul t y of  N ur s i ng,  U ni ve r s i t a s  I s l a m  S ul t a n A gung, S e m a r a ng ,  I ndone s i a       A r t ic le  I n f o     A B S T R A C T   A r ti c le  h is to r y :   R e c e iv e d  S e p 12, 2024   R e vi s e d  O c t  30, 2025   A c c e pt e d  O c t  20, 2025       Diabetes  mellitu s  (DM)  is  a  chronic   disease  with  a  growing   global  burden  and  specific  challenges  for  early  management,  particularly  in  region s  with  limited  access  to  h ealthcar e.  T his   study  develops   a  web - based   syst em  to  classify   diabetes  risk  from  medical  history   using   extreme  gradient  b oostin g   ( XGBoost ) ,  an  ensemble  model   of  decision  trees.   The  dataset   compris ed  520  respondents  (320  DM,  200  non - DM)  and  underwent  la beling,  standardization,  and  an  80:20  train – test  split,  followed  by  hyperparameter  selection  via  grid  search  and  5 - fold  cross - validation   (CV).  On  the   t est  set,  the  model  achieved  an   accuracy  of   0.9888,  precision   of  1.0000,   re call  of  0.9718,  and  an  F1 - score  of  0.9857;  discriminative  pe rformance  wa s  also  strong  with  an  area   under  the   receiver  operating  characteristic   curve  (AUC - ROC)  of  0. 839.  These  findings  confirm  that  XGBoost  effectively  h andles  complex  or  imbalanced   medical  data  while  providi ng  probabil istic  output s  that  are  clinically  meaningful.  Deployed  as  a  web   application,  the  system  can  support  early  screening,  triage,  and  clinical  decision - making,  t hereby  expediti ng  referrals  and  personali zing  intervent ions  in  primary  care  and  hospital settings, especially in resource - constrain ed enviro nments.  Thi s work  lays  the  groundwork  for  further  development,  including   the  integrat ion  of  expl ainable  artificial   intell igence  (XAI)  techniqu es  to  enhance  c linical   transpar ency.   K e y w o r d s :   D e c is io n t r e e     D ia be te s  m e ll it us   M a c hi ne  l e a r ni ng   P r e di c ti on   X G B oos t   This is an  open  acce ss artic le unde r the  CC BY - SA   license.     C or r e s pon di n g A u th or :   A ndi  R ia ns ya h   D e pa r tm e nt  of  I nf or m a ti c s  E ngi ne e r in g, F a c ul ty  of   I ndus tr ia l  T e c hnol ogy ,  U ni ve r s it a s  I s la m  S ul ta n A gung   K a li ga w e   S tr e e t   K m . 4, S e m a r a ng 50112, I ndone s ia   E m a il :  a ndi @ uni s s ul a .a c .i d.       1.   I N T R O D U C T I O N     I n ge ne r a l,  di a be te s  r e f e r s  t o a  gr oup of  c ondi ti ons  t ha t  a f f e c t  pr oc e s s e s  i n t he  body, c ha r a c t e r iz e d by  a   s us ta in e d  in c r e a s e   in   bl ood  s uga r   le ve l s   due   to   da m a ge   to   th e   f unc ti on  of   or ga ns   s uc h  a s   ne r ve s ,  ki dne y s ,  he a r t,   a nd  bl ood  ve s s e ls .   T hi s   di s e a s e   c a n  le a d  to   va r io us   s e r i ous   c om pl ic a ti ons   th a t  im pa c t  m a ny  or ga n s   in   th e   body,  w it h  a   r a nge   of   s ym pt om s   [ 1] .  I n  I ndone s ia ,  th e   pr e va le nc e   of   di a gnos e d  di a be te s  c ont in ue s   to   r is e ,   a s   r e f le c te d  in   th e   R is ke s da s   da ta  s in c e   2018,   w hi c h  pr ovi de s  a   de ta il e d  pi c tu r e   of   th e   di s tr ib ut io n  of   di a be te s   a c r os s   th e   a r c hi pe la go.  T hi s   c ondi ti on  r e qui r e s   a   d e e p  unde r s t a ndi ng  to   pl a n  e f f e c ti ve   in te r ve nt io ns   f or   th e   pr e ve nt io n  a nd  m a na ge m e nt   of   di a be te s   in   th e   c om m uni ty   [ 2] ,  [ 3] .  D ia be te s   ha s   e vol ve d   in to   a   gl oba l   he a lt h   is s ue   w it h  in c r e a s in g  num be r s   e v e r y  ye a r .  T hi s   in di c a te s   th a t  di a be te s   is   not   ju s t  a   lo c a l  he a lt h  pr obl e m   but   ha s   be c om e   a   gl oba l  c h a ll e nge   th a t   r e qui r e s   a tt e nt io n   a nd  c o ll e c ti ve   a c ti on  f r om   va r io us   pa r ti e s   w ho   a r e   a w a r e   [ 4] ,  [ 5] .   I n  r e c e nt   ye a r s ,  th e   us e   of   m a c hi ne   le a r ni ng  te c hni que s   ha s   be c om e   ve r y  popula r   f or   di s e a s e   pr e di c ti on.  H ow e ve r ,  th e   a c c ur a c y  of   di s e a s e   pr e di c ti ons   r e m a i ns   a   s ig ni f ic a nt   c ha ll e nge   in   th e   m e di c a l  f ie ld .  Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A dv A ppl  S c i     I S S N :   2252 - 8814       I m pl e m e nt at io n of  X G B oos t  fo r  di abe te s  m e ll it us  r i s k  pr e di c ti on bas e d on he al th  hi s to r y   ( A ndi  R ia ns y ah)   1029   W it h t he  pr e s e nc e  of  a r ti f ic ia l  in te ll ig e nc e , i t  is  hope d t ha t  it  c a n pr e di c t  di s e a s e s , e s pe c ia ll y di a be te s  m e ll it us   ( D M ) , s o t ha t  pa ti e nt s  c a n r e c e iv e  pr om pt  a nd a c c ur a te   c a r e   [ 6] ,  [ 7] .   T he   e xt r e m e   gr a di e nt   boos ti ng  ( X G B oos t )   pr oc e s s   c a n  e nha n c e   pr e di c ti on  a c c ur a c y  th r ough  m ul ti - th r e a di ng,  w hi c h  e f f ic ie nt ly   ut il iz e s   C P U   c or e s   to   s ig ni f ic a nt ly   a c c e le r a te   th e   a lg or it hm ' s   pe r f or m a nc e .  T hi s   a lg or it hm  a ppl ie s  e ns e m bl e  t e c hni qu e s  a nd f oc u s e s  on t he  gr a di e nt  of  t he  opt im iz e d l os s  f unc ti on, r e s ul ti ng i n  a   m ode l  th a t  is   ve r y  r obus t  a nd  a c c ur a te   [ 8] – [ 10 ] .   W it h  X G B o os t,   th is   r e s e a r c h  a im s   to   pr oduc e   a   m ode l  th a t  c a n  pr e di c t  th e   r is k  of   D M   ba s e d  on  a n  in di vi dua l' s   he a lt h  hi s t or y  to   e nha nc e   e a r ly   di a gnos i s   [ 11] – [ 13] .  T he   r e s e a r c he r s   hop e   to   c ont r ib ut e   to   th e   d e ve lo pm e nt   of   m or e   a c c ur a te   pr e di c ti ve   to ol s   th a t  c a n  a s s i s t  in   e a r ly   pr e ve nt io n  a nd  m a na ge m e nt   f or   th os e   a t  r is k,  a s   w e ll   a s   pr ovi de   a ddi ti ona l  in f or m a ti on   a bout   r is k  f a c to r s   a s s oc ia t e d w it h  DM .   T hi s   r e s e a r c h  li e s   in   th e   im pl e m e nt a ti on  of   th e   X G B oos t  a lg or i th m   f or   p r e di c ti ng  D M   r is k  ba s e d  on   pa ti e nt s ’   he a lt h  hi s to r y  a nd  it s   in te gr a ti on  in to   a   w e b - ba s e d  s ys te m   [ 1] .  U nl ik e   m a ny  pr e vi ous   s tu di e s   th a t   pr im a r il y  r e li e d  on  c onve nt io na l  m ode ls   s uc h  a s   lo gi s ti c   r e gr e s s io n   ( L R ) ,  s uppor t  ve c to r   m a c hi ne   ( S V M ) ,  or   r a ndom  f or e s t   ( R F ) ,  th is   s tu dy  de m ons tr a te s   th e   s upe r io r   a b il it y  of   X G B oos t  to   ha ndl e   i m ba la nc e d  a nd  c om pl e x  m e di c a l  da ta s e ts ,  f ur th e r   opt im iz e d  th r ough  hype r p a r a m e te r   tu ni ng  w it h  gr id   s e a r c h  a nd  c r os s - va li da ti on [ 2] . T he  m a in  c ont r ib ut io ns  o f  t hi s  w or k i nc lu de  t he   de ve lo pm e nt  of  a  hi gh - pe r f o r m a nc e  pr e di c ti ve   m ode l  w it h  th e   c r e a ti on  of   a   us e r - f r ie ndl y  w e b  a ppl ic a ti on  to   f a c il it a te   e a r ly   de te c ti on  of   di a be te s   r is k,   a nd   th e   pr ovi s io n  of   pr oba bi li s ti c   out put s   th a t  of f e r   m or e   nua nc e d  de c is io n  s uppor t  f or   he a lt hc a r e   pr of e s s io na ls .   I n  a ddi ti on,  th is   r e s e a r c h  c ont r ib ut e s   to   th e   s c ie nt if ic   c om m uni ty   by  hi ghl ig ht in g   th e   pr a c ti c a l  a dva nt a ge s   of   X G B oos t  in   m e di c a l  in f or m a ti c s   a nd  pr ovi di ng   a   f ounda ti on   f or   f ut u r e   e xpl or a ti on   of   hyb r id   or   e ns e m bl e   m ode ls  f or  di s e a s e  pr e di c ti on   [ 3] .       2.   R E V I E W OF  L I T E R A T U R E   T h is   s e c ti on  r e v ie w s   pr i or   s t udi e s   a pp ly i ng  t he   X G B oo s t  a l g or it h m   i n  m e di c a l  a nd  r e l a t e d   f i e ld s .  R e s e a r c h   [ 14]   hi g hl i ght s   t he   im p or t a n c e   of   f e a t ur e   a n a l ys is   in   X G B o os t   f or   c a r di o va s c u la r   di s e a s e   pr e di c ti on ,  s h ow i ng  s tr on g  a c c u r a c y  c o m p a r e d  t o  o th e r   m od e l s   ( 95%   f or   RF ,   90%   f or   S V M ,   a nd  86%   f or   LR ) .  A n ot h e r   s t udy   a ppl ie d  X G B oo s t   w it h   f e a t ur e  s e l e c ti on a n d  h yp e r p a r a m e t e r   o pt i m i z a ti o n  i n s p a m  de te c ti on , a c hi e vi ng a n   a c c ur a c y  of   92 .67%   a nd  o ut p e r f or m in g  C h i  a n d  pr in c ip a l  c om po ne n t  a n a l ys is   ( P C A ) - b a s e d  m e th od s   [ 15] ,   [ 16] .   I n  th is   s tu dy,  hyp e r pa r a m e te r s   s uc h  a s   m a x_d e pt h,  le a r ni ng_r a te ,  a nd  n_e s ti m a to r s   w e r e   s ys te m a ti c a ll y   opt im iz e d  u s in g  gr id   s e a r c h  w it h   5 - f ol d  c r os s - va li da ti on  to   b a la nc e   m ode l  c om pl e xi ty ,   le a r ni ng  e f f ic ie nc y,  a nd  ove r f it ti ng  r is ks   [ 4] .  E va lu a ti on  m e t r ic s   in c lu de d  a c c ur a c y,  pr e c is io n,  r e c a ll ,  a nd     F1 - s c or e   to   e ns ur e   c li ni c a l   r e le va nc e   in   di a be te s   pr e di c ti o n.  P r e c is io n  r e duc e s   f a ls e   di a gno s e s ,   r e c a ll   m in im iz e s  unde te c te d c a s e s , a nd F 1 - s c or e  ba la n c e s  bot h, e s pe c i a ll y us e f ul  f or  i m ba la nc e d da ta s e t s   [ 3] .   W hi le   X G B oos t   de m ons tr a te s   s tr ong  pe r f or m a nc e   f or   di a be te s   r is k  pr e di c ti on,  c om pa r is ons   w it h   ot he r   m ode ls   a r e   e s s e nt ia l.   RF   of f e r s   r obus tn e s s   but   hi ghe r   c om put a ti on  c os ts   [ 17] ;  LR   i s   s im pl e r   y e t  le s s   e f f e c ti ve   w it h  non - li ne a r   da ta   [ 18] ;  S V M   pe r f or m s   w e ll   w i th   hi gh - di m e ns io na l  da ta   but   s tr uggl e s   w it h   s c a la bi li ty ;  a nd  A N N s   c a pt ur e   c om pl e x  p a tt e r ns   but   r e qui r e   la r ge   da ta s e ts   a nd   c a r e f ul   tu ni ng.  B e n c hm a r ki ng  a ga in s t  th e s e   m ode l s ,   R F ,  S V M ,  L R ,   a nd  a r ti f ic ia l  ne ur a l  n e twor k   ( A N N )   is   ne e d e d  to   c onf ir m   X G B oos t’ s   s upe r io r it y  in   c om pl e x  a nd   im ba la nc e d   m e di c a l  d a ta s e t s   [ 19] .   F ut ur e   r e s e a r c h   s h oul d  e x pa nd   t o   la r g e r   a n d  m or e   di ve r s e   d a t a s e t s ,  i nc lu di n g  r e a l - ti m e   e l e c tr o ni c   h e a lt h   r e c o r ds   ( E H R s ) .  H y br id   e ns e m bl e   m e th od s   s u c h   a s   s t a c ki ng  a nd  ba gg in g  m a y  e nh a n c e   r o bu s tn e s s ,  w hi le   in t e g r a ti ng  e x pl a in a b le   A I   ( X A I )   i s   c r uc i a l  f or   in t e r pr e t a bi li t y  a n d  c li ni c a l  a do pt i on.     2.1.  Diab e t e s   m e ll it u s   DM   is   a   c om m on  di s e a s e   c ha r a c te r iz e d  by  hi gh  le v e ls   of   s uga r   in   ur in e   a nd  bl ood.  T he   te r m   “ di a be te s ”   c om e s   f r om   th e   G r e e k  di a ba in e n,  m e a ni ng  “ to   f lo w   c ont in uous ly ,”   w hi le   “ m e ll it us ”   c om e s   f r om   th e   L a ti n  m e ll it us ,  m e a ni ng  “ hone y.”   T hi s   c ondi ti on  oc c ur s   w he n  th e   pa nc r e a s   doe s   not   pr oduc e   s uf f ic ie nt   in s ul in   [ 5] .  I ns ul in   pl a ys   a   c r uc ia l  r ol e   in   tr a ns por ti ng   bl ood  s uga r ,  de r iv e d  f r om   c a r bohyd r a te   br e a kdown,   in to   c e ll s   f or   e ne r gy.  A   la c k  of   in s ul in   le a d s   to   e l e va te d  bl oo d  s uga r   le ve ls ,   w hi c h ,   ove r   ti m e   m a y  da m a ge   or ga ns   a nd  body  ti s s ue s .  C om m on  s ym pt om s   in c lu de   f r e que nt   ur in a ti on,  e xc e s s iv e   th ir s t,   in c r e a s e d  a ppe ti te ,   s udde n w e ig ht  l os s , f a ti gue , obe s it y, s lo w - he a li ng w ounds , vi s i on pr obl e m s , a nd i tc hi ng   [ 17] ,  [ 19] .   A c c or di ng  to   th e   A m e r ic a n  D ia be te s   A s s oc ia ti on  ( A D A ) ,  a   ne w   pa ti e nt   is   di a gnos e d  w it h  di a be te s   e ve r y  21  s e c onds ,  r e f le c ti ng  a   hi gh  in c id e nc e   r a te   [ 2] .  D ia be te s   is   a   le a di ng  c a u s e   of   pr e m a tu r e   de a th   w or ld w id e  a nd c ont r ib ut e s  t o s e ve r e  c om pl ic a ti ons  s uc h  a s  bl in dne s s , he a r t  di s e a s e , a nd kidne y f a il ur e   [ 18] .   D M   is   of te n  c a ll e d  a   “ s il e nt   ki ll e r ”   be c a us e   m a ny  p a ti e nt s   r e m a in   una w a r e   of   th e ir   c ondi ti on  unt il   bl ood   ve s s e l  da m a ge   or   ot he r   c om pl ic a ti ons   oc c ur .  R is k  f a c to r s   a r e   not   li m it e d  to   ol de r   a dul ts ,  a s   a nyone   f r om   young  to   e ld e r ly   c a n  de ve lo p  th e   di s e a s e   [ 20] .  L if e s ty le   f a c to r s   pl a y  a   s ig ni f ic a nt   r ol e ,  w it h  D M   f r e que nt ly   a s s oc ia t e d w it h c hr oni c  c ondi ti ons  s u c h a s  hyp e r te ns io n a nd hi gh c hol e s te r ol  l e ve ls   [ 18] .     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8814   I nt  J  A dv A ppl  S c i ,  V ol .  14 , N o.  4 ,  D e c e m be r   20 25 :  1028 - 1039   1030   2.2.  P r e d ic t io n   P r e di c ti on  in   th e   c ont e xt   of   m a c hi ne   le a r ni ng  is   th e   pr oc e s s   of   e s ti m a ti ng  f ut ur e   out c om e s   or   va lu e s   ba s e d  on  hi s to r ic a l  da ta   [ 21] .  T hi s   hi s to r ic a l  in f or m a ti on   m a y  c om e   f r om   th e   c ur r e nt   da ta s e t  or   f r om   s pe c if ic   in put   da ta   [ 21] .  T he   goa l  is   to   de ve lo p  a   m od e l  th a t  c a n  le a r n  pa tt e r ns   f r om   e xi s ti ng  da ta   a nd  th e n  us e   it   to   pr e di c t  out c om e s  on uns e e n da ta , a ll ow in g pr e ve nt iv e  m e a s ur e s  t o be  i m pl e m e nt e d e a r li e r   [ 22] .     2.3.  D e c is io n   t r e e   I n  ge ne r a l,   a   de c is io n  tr e e   i s   a   d e c is io n - m a ki ng  te c hni qu e   th a t  or ga ni z e s   e a c h   c hoi c e   in to   a   br a nc hi ng  s tr uc tu r e   [ 23] .  A c c or di ng  to   [ 24] ,  de c is io n  tr e e s   a r e   a   popula r   a nd  e f f e c ti ve   m e th od  in   th e   f ie ld s   of   c la s s if ic a ti on a nd pr e di c ti on t ha t  tr a ns f or m  da ta  i nt o  a n e a s il y unde r s ta nda bl e  de c is io n r ul e  t r e e . T hi s  r ul e  c a n  be   e xpr e s s e d  by s e a r c hi ng  f or   or   f il te r in g  da ta   a c c or di ng  to   th e   c r it e r ia   ge ne r a te d  by  th e   c la s s if ic a ti on  m ode l.   D e c is io n t r e e s  r e duc e  a  l a r ge  da ta s e t  in to  a  s m a ll e r  da ta s e t.  W h e r e  e a c h l e a f  node  r e pr e s e nt s  a  c la s s  l a b e l.  T he   r oot   a nd  in te r na l  node s   c ont a in   a tt r ib ut e   te s t  c ondi ti ons ,  u s ua ll y  in   th e   s ha pe   of   a n  ova l,   w hi le   th e   le a f   node s   a r e  s qua r e - s ha pe d.   A  de c is io n t r e e  c la s s if ie s  da ta  by a s ki ng que s ti ons  r e la te d t o t h e  c ha r a c te r is ti c s  of  e a c h f e a tu r e  i n t he   da ta .  E a c h  que s ti on  is   r e pr e s e nt e d  by  a n  in te r na l   node   c onne c te d  to   c hi ld   node s   th a t  r e pr e s e nt   th e   a ns w e r s   to   th e   que s ti on.  I n  th is   w a y,  th e   qu e s ti ons   f or m   a   hi e r a r c hi c a l  s tr uc tu r e   in   th e   s ha p e   of   a   tr e e .   T he   de c is io n   tr e e   is   bui lt   by  gr a dua ll y  a ddi ng  que s ti on  node s ,  gui de d  by  la b e le d   tr a in in g  da ta .  D e c is io n  tr e e s   na tu r a ll y  di vi de   is s ue s   in to   s m a ll e r   c om pon e nt s   in   or de r   to   s ol ve   th e m ,  u s e d  to   di vi de   da ta   in to   m or e   s pe c if ic   s ubn e ts   by   c ont in uous ly   a s ki ng  qu e s ti ons   unt il   r e a c hi ng  a   c ondi ti on  w h e r e   f ur th e r   di vi s io n  is   no  lo nge r   ne c e s s a r y  s how n   in  F ig ur e  1  [ 15] .           F ig ur e  1.  D e c is io n t r e e  s tr uc tu r e       2.4.  E xt r e m e  g r ad ie n t  b oos t in g   X G B oos t  w a s   in tr oduc e d  by  W a ng   e t  al .   [ 10]   a s   a   de ve lo pm e nt   of   th e   gr a di e nt   boos ti ng   de c is io n  tr e e   ( G B D T )   pr e vi ous ly   in tr oduc e d  by  [ 25] ,  [ 26] .  T hi s   a lg or it hm   bui ld s   de c is io n  tr e e s   it e r a ti ve ly ,  w he r e   e a c h  ne w   tr e e   c or r e c ts   th e   e r r or s   of   th e   pr e vi ous   one .  T he   w e ig ht s   of   e a c h   tr e e   a r e   a l s o  a dj u s te d,  r e s ul ti ng  in   a   s tr onge r  a nd mor e  r e li a bl e  m ode l  [ 27] – [ 30] .   I n  th is   s tu dy,  X G B oos t  w a s   c om pa r e d   w it h  two  ba s ic   m ode l s   c om m onl y  us e d  in   m e di c a l   pr e di c ti on:   LR   a nd  de c i s io n  tr e e s .   L R   w or ks   w e ll   f or   s im pl e r   c a s e s ,   but   l a c ks   a c c ur a c y   in   ha ndl in g  c om pl e x   non - li ne a r   r e la ti ons hi ps   [ 6] .  D e c i s io n  tr e e s   pr ovi de   b e tt e r   in te r pr e ta bi li ty   but   a r e   pr one   to   ove r f it ti ng  w he n  de a li ng  w it h  da ta s e ts   c ont a in in g  m a ny   f e a tu r e s   or   noi s e .  I n  c ont r a s t,   X G B oos t  c om bi ne s   m ul ti pl e   de c is io n   tr e e s   th r ough   e ns e m bl e   le a r ni ng,  e f f e c ti ve ly   ha ndl in g   f e a tu r e   in te r a c ti on s   a nd  d e li ve r in g  m or e   s t a bl e   a nd   a c c ur a t e   pr e di c ti ons  f or  c om pl e x m e di c a l  da ta s e t s .   T he  m a in  a dva nt a ge  of  X G B oos t  li e s  i n i ts  a bi li ty  t o pr ovi de  h i ghl y a c c ur a te  pr e di c ti ons  of   D M   r is k,  a c hi e vi ng  99.79%   tr a in in g  a c c ur a c y  a nd  98.88%   te s ti ng  a c c ur a c y,  s ig ni f ic a nt ly   out pe r f or m in g  LR   a nd   de c is io n  tr e e s   [ 7] .  M or e ove r ,  X G B oos t  is   m or e   e f f e c ti ve   a t  ha ndl in g  im ba la nc e d  da ta ,  w hi c h  is   c om m on  in   di s e a s e   pr e di c ti on  c a s e s .  A lt hough  in te r pr e ta bi li ty   r e m a in s   a   c ha ll e nge ,  X G B oos t’ s   a bi li ty   to   m a na ge   da ta   c om pl e xi ty   a nd  de li ve r   c ons is te nt   r e s ul ts   m a ke s   it   a   s tr ong  c a ndi da te   f or   m e di c a l  a ppl ic a ti ons ,  pa r ti c ul a r ly   in   e a r ly  di a be te s  r is k de te c ti on.   Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A dv A ppl  S c i     I S S N :   2252 - 8814       I m pl e m e nt at io n of  X G B oos t  fo r  di abe te s  m e ll it us  r i s k  pr e di c ti on bas e d on he al th  hi s to r y   ( A ndi  R ia ns y ah)   1031   T e c hni c a ll y,  X G B oos t  w or ks   by  bui ld in g  r e gr e s s io n  tr e e s   th a t  m a p  da ta   poi nt s   to   le a ve s   w it h   c ont in uous   s c or e s .  I t  m in im iz e s   a   r e gul a r iz e d  obj e c ti ve   f unc ti on  ( L 1   a nd   L 2)   a nd  a   c onve x   lo s s   f unc ti on,  us in g  gr a di e nt   de s c e nt   to   r e duc e   e r r or .  E a c h  ne w   tr e e   is   tr a in e d  to   pr e di c t  th e   r e s id ua ls   of   th e   pr e vi ou s   one s ,  a nd  th e   e ns e m bl e   of   tr e e s   ul ti m a te ly   pr oduc e s   th e   f in a l  pr e di c ti on   [ 25] .   F ig ur e   2  il lu s tr a te s   how   X G B oos t  w or ks ,  w he r e \ pr opt o_i   is   th e   r e gul a r iz a ti on  pa r a m e te r   a nd   r _i   i s   th e   r e s id ue   c a lc ul a te d  w it h  th e   f ir s t  tr e e ,  a nd   h_i   is   a   f unc ti on  th a t  ha s   b e e n  ta ught   to   f or e c a s t  r e s id ua l s ,  r _i   us in g   X   f or   th e   f ir s t  tr e e .  T o  c a lc ul a te \ pr opt o_i   us in g t he  r e s id ue  c a l c ul a te d r _i  i t  c a n be  c om put e d u s in g  ( 1 ).     arg  ∝ = ∑ ( , − 1 ( )   +   ∝ ℎ ( , − 1 ) ) − 1     ( 1)     ( , ( ) )   is  a  di f f e r e nt ia te d l os s  f unc ti on .   I nf or m a ti on :   –   D a ta  c ol le c ti on ( X,   Y ) :  th e  pr oc e s s  be gi ns  w it h a  da t a s e t  c on s is ti ng of  f e a tu r e  X  a nd t a r ge t  Y .   –   T r e e   1 ( F 1( X ) ) :  th e   f ir s t  m ode l  is  t r a in e d us in g a  da ta s e t.  A f te r  t he  t r e e  i s  c r e a te d, r 1 i s  c a lc ul a te d, w hi c h  is  t he  di f f e r e nc e  be twe e n t he  pr e di c ti ons  of  t r e e  1 a nd t h e  a c tu a l  va lu e  Y .   –   C a lc ul a te   1 :  th e   va lu e   of   α1  is   c a lc ul a te d,   w hi c h  i s   a   r e gul a r iz a ti on  pa r a m e te r   th a t  he lp s   r e duc e   ove r f it ti ng .   –   T r e e   2  ( F 2( X ) ) :  th e   s e c ond  m ode l,   tr a in e d  to   pr e di c t  th e   r e s id u a l  r 1.  A f te r   tr e e   2  is   tr a in e d,  th e   r e s id ua l   r 2 i s  c a lc ul a te d, w hi c h i s  t h e  di f f e r e nc e  be twe e n t he  pr e di c ti on s  of   tr e e  2 a nd t he  r e s id ua l  r 1   –   C a lc ul a te :  th e  va lu e  of  α2 is   c a lc ul a te d f or  t r e e  2.   –   I te r a ti on  pr oc e s s :  th is   pr oc e s s   is   r e pe a te d  f or   m a ny  t r e e s .  ( f r om   tr e e   3  to   tr e e   m ) .  E a c h  ne w   t r e e   is   tr a in e d t o pr e di c t  t he  r e s id ua ls  f r om  t he  pr e vi ous  t r e e , a nd ne w   r e s id ua ls  a r e  c a lc ul a te d a t  e a c h s te p. T he   va lu e  of   α i  is  a ls o c a lc ul a te d e a c h t im e  f or  e a c h t r e e  i .   –   T h e   f i na l  m od e l  F m ( X ) :  a  c om bi n a t io n  of   e a c h  t r e e  t h a t  h a s  b e e n  tr a in e d.   T hi s   c o m b in a ti on  i s   w r it te n  a s   ( 2) .       ( ) = − 1 ( ) + ℎ ( , − 1 )   ( 2)     W h e r e   hi  i s  a  f unc ti on t r a in e d t o pr e di c t  th e  r e s id ua l  r i  a t  th e  i - th  t r e e .   –   O pt i m i z in g   α: t o c a lc ul a t e  t he  va lu e  of  α, the n m in im iz e  t he  di f f e r e nt ia bl e  l os s  f unc ti on L , us in g  ( 3) .        ∝ ∑ ( , − 1 ( )   +   ∝ ℎ ( , − 1 ) ) = 1   ( 3)     I nf or m a ti on :   L   is   lo s s   f unc ti on ,    is   th e   a c tu a l   ta r ge t  va lu e   ( 0  or   1) ,  − 1 ( )   is   pr e di c ti on  of   th e   m ode l  in   th e   pr e vi ous   it e r a ti on ,  ∝   is   th e   c oe f f ic ie nt   th a t  de te r m in e s   th e   e xt e nt   of   th e   c ont r ib ut io n  o f   th e   ne w   m ode l  h_i ,  ℎ ( , − 1 )   is   th e   ne w   m ode l  a dde d  in   th e   i  it e r a ti on ,   a nd  − 1   is   r e s id ua l  or   e r r or   in   th e   pr e vi ous  i te r a ti on.           F ig ur e  2. H ow  X G B oos t  w or ks   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8814   I nt  J  A dv A ppl  S c i ,  V ol .  14 , N o.  4 ,  D e c e m be r   20 25 :  1028 - 1039   1032   T he   us e   of   te c hnol ogy ,   s uc h  a s   m a c hi ne   le a r ni ng  a lg or it hm s   in   pr e di c ti ng  di a be te s ,   is   a l s o  r a pi dl y  a dva nc in g, m a ki ng i t  im por ta nt  t o r e c ogni z e  w he th e r  s om e one  f a ll s  i nt o t he  c a te gor y of  pa ti e nt s  w it h di a be te s   be f or e   th os e   w it h  D M   e xp e r ie nc e   s e r io us   c om pl ic a ti ons ,  s o  th a t  th e y  c a n  r e c e iv e   a ppr opr ia te   a nd  ti m e ly   tr e a tm e nt .  T he   X G B oos t  a lg or it hm   ha s   be c om e   popula r   f or   pr e di c ti ng  di s e a s e s .  T h e r e f or e ,  in   th is   r e por t,   w e   w il l  ut il iz e   th e   X G B oos t  a lg or it hm   a s   one   of   th e   im pl e m e nt a ti ons   to   ge ne r a te   pr e di c ti ons   f or   th e   r is k  of   DM .  T hi s   s ys te m   is   e xpe c te d  to   be   be ne f ic ia l  f or   he a lt hc a r e   w or k e r s   a nd  to   he lp   im p r ove   hos pi ta l  s e r vi c e s   f or   pa ti e nt s , e s p e c ia ll y i n e a r ly  de te c ti on, pa r ti c ul a r ly  of  di a be te s  m e ll it us , a nd i n pe r s ona li z in g t r e a tm e nt .       3.   M E T H O D   A n  a ddi ti ona l  e xpl a na ti on  to   s tr e ngt he n  th e   a ppl ie d  s c ie nc e   f r a m in g  a nd  it s   r e le va nc e   to   I ndone s ia ’ s   he a lt hc a r e  c ont e xt :  X G B oos t  c a n be  ope r a ti ona li z e d a s  a n i nt e ll ig e nc e  c om pone nt  i n  c li ni c a l  de c is io n s uppor t   a t  P us ke s m a s   a nd  hos pi ta l s   f or   e a r ly   di a be te s   s c r e e ni ng ,   f or   e xa m pl e ,  in te gr a te d  w it h  e le c tr oni c   m e di c a l   r e c or ds   a nd  r out in e   a na m ne s is   f or m s   s o   th a t  he a lt h  w or ke r s   r e c e iv e   a   r e a l - ti m e   r is k  s c or e   a nd  it s  c ont r ib ut in g   f a c to r s .  I ts   e f f ic ie nc y  a nd  s c a la bi li ty   e na bl e   de pl oym e nt   in   o f f li ne - f i r s t  m obi le   a ppl ic a ti ons   f or   a r e a s   w it h   li m it e d c onne c ti vi ty , w hi le  i ts  i nt e r pr e ta bi li ty  he lp s  c li ni c ia ns  unde r s ta nd t he  i nf lu e nc e  of  l oc a l  va r ia bl e s  s uc h  a s   body  m a s s   in de x ,   f a s ti ng  bl ood  gl uc os e ,  bl ood  pr e s s ur e ,  f a m il y  hi s to r y,  di e t,   a nd  phys ic a l   a c ti vi ty ,  m a ki ng  f ol lo w - up  r e c om m e nda ti ons   m or e   a c ti ona bl e .  I n  a ddi ti on,   th is   a ppr oa c h  f it s   I ndone s ia ’ s   ne e d  f o r   r e s our c e - e f f ic ie nt   s ol ut io ns :  X G B oo s t  ha ndl e s   im ba la nc e d   d a t a   a nd   m a ny   f e a tu r e s   w i th o ut   c o s tl y  in f r a s tr uc tu r e ,   it s   a c c ur a c y c a n b e   m oni to r e d a c r o s s   r e g io n s , a nd   it   c a n   b e  a li gn e d  w it h   l oc a l  po li c ie s   s o  i t  i s   r e a d y  f or   u s e   i n  non - c om m uni c a bl e  di s e a s e s  pr ogr a m  m a na g e m e nt   da s hbo a r ds  a nd e ve r yda y c li ni c a l  w or kf lo w s .     3.1.   D at as e t   T hi s  da ta s e t  is  c a ll e d  e a r ly - s ta ge   di a be t e s  r is k pr e di c ti on dia be te s   a nd w a s  dow nl oa d e d f r om  K a ggl e .  T he   da ta   us e d   in   th is   r e s e a r c h  is   s e c onda r y  da ta   obt a in e d  f r om   que s ti onna ir e s   f il le d  out   by   pa ti e nt s   a t  S yl he t  D ia be ti c   H o s pi ta l  in   S yl he t,  B a ngl a de s h, a nd  ha s   be e n  a ppr ove d  by  a   doc to r .  T hi s   r e s e a r c h  in vol ve s  a   to ta l  of   520 da ta  poi nt s , c ons i s ti ng of  320 da ta   poi nt s   f or  t he  pos it iv e   D M   c a te gor y a nd 200 f or  t he  non - D M   c a te gor y.   T hi s   da ta  s e t  c ove r s   a   v a r ie ty   of   s ym pt om s   a s s o c ia te d  w it h  di a be te s   [ 29] .  T he   da ta  s uppor ti ng  th e   f in di ngs   of   th is   s tu dy  w e r e   obt a in e d  f r om   va r io us   s c ie nt if ic   a r ti c le s   a nd  m e di c a l  r e c or ds   r e la te d  to   di a be t e s   r is k   pr e di c ti on. T he  da ta  w e r e  pr oc e s s e d a nd a nonymi z e d pr io r  t o u s e  i n t he  de ve lo pm e nt  of  t he  pr e di c ti on mode l .   D ue   to   pr iv a c y  a nd  e th ic a l  c ons id e r a ti ons ,  th e   da ta   a r e   not   pu bl ic ly   a va il a bl e   but   m a y  be   obt a in e d  f r om   th e   c or r e s ponding a ut hor  upon r e a s ona bl e  r e que s t.     3.2.   P r e p r oc e s s in g   T hi s   pr oc e s s   pr e pa r e s   th e   da ta   f or   pr oc e s s in g  in   m ode li ng  w it h  th e   X G B oos t  a lg or it hm .  T he   in it ia l  s te p  in vol ve s   la be li ng  ( la be l  e nc odi ng) ,  w hi c h  is   th e   pr oc e s s   of   c onve r ti ng  da ta   f e a tu r e s   th a t  a r e   or ig in a ll y   te xt   in to   num e r ic   va lu e s   [ 29] .  S e c ond,  f e a tu r e s   a nd  ta r ge ts   a r e   s e pa r a te d  to   e ns ur e   th a t  th e   m ode l  is   tr a in e d  onl y  on  r e le va nt   f e a tu r e s   a nd  u s e s   th e   ta r ge t   to   m a ke   pr e di c ti ons   [ 9] .  N e xt ,  s t a nda r di z e   th e   da ta   to   a dj us t  it   s o   th a t  a ll   f e a tu r e s   a r e   w it hi n   a   uni f or m   r a nge   [ 25] . T he n,  th e   da ta   is   di vi de d   in to   two  w it h   a   di s tr ib ut io n  r a ti o  of   80: 20,  r e s ul ti ng  in   416  da ta   poi nt s   f or   tr a in in g  a nd  104  da ta   poi nt s   f or   te s ti ng.  D a ta   pa r ti ti oni ng  is   c a r r ie d  out   to  e ns ur e  t ha t  th e  m ode l  is  t r a in e d us in g s pe c if ic  da ta  a nd i ts  pe r f or m a nc e  i s  t e s te d us in g f or e ig n  da ta  t ha t  ha s   not  be e n s e e n dur in g t r a in in g   [ 29] .     3.3.   M od e ll in g   A f te r   th e   da ta   s pl it ti ng  pr oc e s s ,   th e   f or m a t  is   c onve r te d  in to   D m a tr ix ,  w hi c h  is   a   s pe c ia l  f or m a t  f or   X G B oos t   de s ig ne d   f or   da ta   s to r a ge .  T he   n e xt   pr oc e s s   is   to   de t e r m in e   th e   hype r pa r a m e te r s   us in g   gr id   s e a r c h  w it h 5 - f ol d  c r os s - va li da ti on . T he  hype r pa r a m e te r s  us e d a r e  a s   s how n   in   T a bl e  1 .       T a bl e  1. H ype r pa r a m e te r s  us e d   H ype r pa r a m e t e r   V a l ue   I nf or m a t i on   m a x_de pt h   [ 3, 4, 5]   T he  m a xi m um  de pt h of  e a c h t r e e .   l e a r ni ng_r a t e   [ 0.01, 0.1, 0.2]   C ont r ol l i ng t he  s t e p s i z e / how  qui c kl y t he  l e a r ni ng f r om  m i s t a ke s  m ode  ope r a t e s  i n  e a c h i t e r a t i on.   n_e s t i m a t or s   [ 550, 100, 200]   T he  t ot a l  num be r  of  t r e e s  t ha t  w i l l  be  bui l t  by t he  m ode l  i n t he  boos t i ng pr oc e s s .       T he   be s t  hype r pa r a m e te r   c om bi na ti on  ba s e d  on  pe r f or m a nc e   dur in g  5  it e r a ti ons   ( c r os s - va li da ti on)   w il l  be   s a v e d  a s   th e   m ode l  f or   m a ki ng  pr e di c ti ons   on  th e   te s ti n g  da ta . T hi s   pr oc e s s   i s   c a r r ie d  out   us in g  5 - f ol d  c r os s - va li da ti on,  w he r e   th e   m ode l  is   e va lu a te d  f or   e a c h  hype r pa r a m e te r   c om bi na ti on  to   obt a in   th e   be s t   Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A dv A ppl  S c i     I S S N :   2252 - 8814       I m pl e m e nt at io n of  X G B oos t  fo r  di abe te s  m e ll it us  r i s k  pr e di c ti on bas e d on he al th  hi s to r y   ( A ndi  R ia ns y ah)   1033   pa r a m e te r   c om bi na ti on  th a t  yi e ld s   th e   m os t  opt im a l   m ode l  pe r f or m a nc e .  T he n,   to   m a xi m iz e   th e   m ode l' s   pe r f or m a nc e ,  th e   m ode l  is   tr a in e d  w it h  tr a in in g  da t a  a nd  e va lu a te d  us in g  te s t  d a ta   [ 16] .  T hi s   pr oc e s s   in vol ve s   r e pe a te d  it e r a ti ons   ove r   5  ti m e s   to   m in im iz e   pr e di c ti on e r r or s   a nd  r e duc e   ove r f it ti ng,  m a ki ng  th e   m ode l  m or e   r e li a bl e   in   m a ki ng  pr e di c ti ons   on  d a ta   th a t  ha s   not   be e n  s e e n  a t  a ll   dur in g  th e   m ode l  tr a in in g  pr oc e s s .  A f te r   th e   tr a in in g  a nd  opt im iz a ti on  pr oc e s s ,   th e   m ode l  i s   s a ve d  f or   f ut ur e   us e   a nd   c a n   be   a ppl ie d  in   r e a l - w or ld   a ppl ic a ti ons   f or   a ut om a ti c   di a be te s   r is k  pr e di c ti on.  W it h  th is   a ppr oa c h,  a n  a c c ur a te   a nd  r e li a bl e   di a be te s   r is k  pr e di c ti on  m ode l  c a n   be   bui lt   u s in g  th e   X G B oos t  a lg or it hm .  T he   f ol lo w in g  is   th e   s y s te m   m ode li ng  d e s ig n  in   th e  f or m  of  a  f lo w c ha r t ,   a s  s how n i n F ig ur e  3.           F ig ur e   3.   S ys te m  m ode li ng f lo w c ha r t       3.4.   M od e l  e val u at io n   T he   m ode l  th a t  w il l  be   e va lu a te d  in   th is   r e s e a r c h  us e s   a   c onf us io n  m a tr ix ,  w hi c h   is   one   w a y  to   m e a s ur e   a   m ode l' s   pe r f or m a nc e   in   c la s s if ic a ti on  pr obl e m s   [ 24] ,  w he r e   th e   c la s s if ic a ti on  r e s ul ts   c a n  be lo ng  to   two  or   m o r e   c la s s e s .  E va lu a ti on  us in g  th e   c onf us io n  m a tr ix   h e lp s   in   id e nt if yi ng  how   th e   m ode l   a c c ur a te ly   pr e di c ts   di a be te s   c ondi ti ons   ( pos it iv e   a nd  n e ga ti ve )   [ 9] .  T he   a c c ur a c y  va lu e   i s   th e   c om pa r is on  b e twe e n  th e   num be r   of   da ta   th a t  ha s   be e n  c or r e c tl y  id e nt i f ie d  a nd  th e   to ta l   da ta   th a t  ha s   be e n  te s te d   [ 29] .  T he   pr e c is io n  va lu e   is   th e   c om pa r is on  be tw e e n  th e   qua nt it y  of   a c c ur a te   f or e c a s ts   a s   w e ll   a s   th e   ov e r a ll   num be r   of     f or e c a s ts   [ 31] .  T he   r e c a ll   va lu e   is   a   c om pa r is on  of   how   m a n y  pr e di c ti ons   a r e   c or r e c t  c om pa r e d  to   a ll   th e   a c tu a l  da ta   [ 32] .  T he   F 1 - s c or e   va lu e   c om bi ne s   pr e c is io n  a nd   r e c a ll   in to   a   s in gl e   m e tr ic ,  w hi c h   is   ve r y  us e f ul   f or  de a li ng w it h i m ba la nc e d da ta   [ 33] – [ 35] .      =    +  (  +  +  +  )   (4 )      =     +    (5 )     =   +    (6 )     1 −  = 2 ×   × +     (7 )       4.   E X P E R I M E N T  A N A L Y S I S   M ode li ng  us in g  th e   X G B oos t  a lg or i th m   ha s   be e n  s uc c e s s f ul ly   a ppl ie d  to   pr e di c t  th e   r is k  of   di a be te s   ba s e d  on  he a lt h  hi s to r y.  T hi s   m ode l  w a s   c hos e n  f or   it s   a dva nt a ge s   in   ha ndl in g  c om pl e x  da ta   a nd  i m ba la nc e d  da ta  di s tr ib ut io ns . T he  r e s ul ts  of  t he  m ode li ng s how  good pe r f o r m a nc e .   O ne   of   th e   li m it a ti ons   of   us in g  X G B oos t   in   th i s   s tu dy  i s   it s   r e la ti ve ly   lo w   in te r pr e ta bi li ty ,  w hi c h  is   a   c r uc ia l  a s pe c t  in   m e di c a l  a ppl ic a ti ons .  A lt hough  X G B oos t  ha s   de m ons tr a te d  hi gh  pr e di c ti ve   a c c ur a c y,  it s   e ns e m bl e - ba s e d  a nd  c om pl e x  na tu r e   m a ke s   th e   de c is io n - m a ki ng  pr oc e s s   di f f ic ul t  to   unde r s ta nd  di r e c tl y  b y   he a lt hc a r e   pr of e s s io na ls .  I n  c li ni c a l  pr a c ti c e ,  phys ic ia n s   r e qui r e   not   onl y  th e   pr e di c ti on  r e s ul ts   but   a ls o  c le a r   e xpl a na ti ons   of   th e   c ont r ib ut in g  f a c to r s   be hi nd  th os e   r e s ul ts   i n  or de r   to   e ns ur e   e th ic a l  us e   a nd  bui ld   tr us t.   T he r e f or e ,  f ut ur e   r e s e a r c h  s houl d  c ons id e r   in te gr a ti ng  X A I   a ppr oa c he s ,  s uc h  a s   S ha pl e y  a ddi ti ve   e xpl a na ti ons   ( S H A P )   or   lo c a l  in te r pr e ta bl e   m ode l  a gnos ti c   e xpl a na ti on  ( L I M E ) ,  to   pr ovi de   in s ig ht s   in to   th e   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8814   I nt  J  A dv A ppl  S c i ,  V ol .  14 , N o.  4 ,  D e c e m be r   20 25 :  1028 - 1039   1034   dom in a nt   f e a tu r e s   in f lu e nc in g  e a c h   pr e di c ti on.  B y   doi ng  s o,   th e   m ode l  w il l  not   onl y  be   a c c ur a te   but   a l s o  tr a ns pa r e nt , t r us twor th y, a nd be tt e r  a li gne d w it h t he  ne e ds  of  m e di c a l  de c is io n  s uppor t.     4.1.  P r e p r oc e s s in g   T hi s   s e c ti on  out li ne s   th e   pr e pr oc e s s in g  s te p s ,  in c lu di ng  l a be l   e nc odi ng,  f e a tu r e - ta r ge t  s e pa r a ti on,   a nd   da ta   s ta nd a r di z a ti on  to   pr e pa r e   th e   da ta s e t  f or   X G B oos t  m ode li ng.   F ig ur e   4  s how s   th e   e nc odi ng  pr oc e s s   c onve r ts   a ll   c a te gor ic a l  f e a tu r e s   in to   bi na r y  va lu e s   ( 0  a nd   1) .  F ig ur e   5   s how s   th a t  th e   p r e di c to r   va r ia bl e s   ( x )  c ons is t  of   pa ti e nt   s ym pt om s   a nd  c ha r a c te r is ti c s ,  w hi le   th e   ta r ge t  va r ia bl e   ( y)   is   th e   c la s s   c ol um n  r e pr e s e nt in g  th e  di a gnos is  l a be l.     4.2.   D e t e r m in e  h yp e r p ar a m e t e r s   T hi s   s e c ti on  out li ne s   th e   d e te r m in a ti on  of   hype r pa r a m e te r s   f o r   X G B oos t  m ode li ng.   F ig ur e   6   s how   th a t  th e   be s t  X G B oos t  m ode l  us e s   e v a l_ m e tr ic = lo gl os s ,  l e a r ni ng_r a te = 0.1,  m a x_de pt h= 4,  n_e s ti m a to r s = 100,   a nd obje c ti ve = bi na r y: lo gi s ti c .           F ig ur e   4 .  O ut put  a f te r  e nc odi ng da ta           F ig ur e   5 .  O ut put  of  s e pa r a ti ng f e a tu r e s  a nd t a r ge ts           F ig ur e   6 .  O ut put  de f in e s  t he  hype r pa r a m e te r s   Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A dv A ppl  S c i     I S S N :   2252 - 8814       I m pl e m e nt at io n of  X G B oos t  fo r  di abe te s  m e ll it us  r i s k  pr e di c ti on bas e d on he al th  hi s to r y   ( A ndi  R ia ns y ah)   1035   4.3.   R e s u lt   t r ai n  an d  t e s t   T hi s   s e c ti on  di s c us s e s   th e   m ode l' s   pe r f or m a nc e ,  il lu s tr a ti ng  th e   tr a in in g  a nd  te s ti ng  pe r f or m a nc e   in   pr e di c ti ng  da ta .   F ig ur e   7   s ho w s   th e   r e s ul t  of   s a vi ng  a   m ode l  t ha t  ha s   gon e   th r ough  th e   gr id   s e a r c h  s ta ge ,  a   m ode l  w it h  th e   be s t  hype r pa r a m e te r   c om bi na ti on  ba s e d  on  pe r f or m a nc e   ove r   5  it e r a ti ons .  ( c r os s - va li da ti on) .   T hi s   m ode l  w il l  b e   us e d  to   m a ke   pr e di c ti ons   on  th e   te s ti ng  da ta .  T he   m e tr ic   r e s ul ts   ge ne r a te d  dur in g  th e   m ode l  tr a in in g  a r e   di s pl a ye d  in   a   m o r e   r e a da bl e   f or m a t   a n d   di s pl a yi ng  f our   de c im a l  pl a c e s .  P r ove n  by   di s pl a yi ng/ c a lc ul a ti ng  e va lu a ti on  m e tr ic s   on  th e   tr a in in g  da ta .  A   c onf us io n  m a tr ix   is   us e d  to   s e e   how   m a ny   c or r e c t  a nd i nc or r e c t  pr e di c ti ons  t he  m ode l  m a de  on t he  t r a in in g da ta .   T he   a c c ur a c y  pr oduc e d  f r om   th e   im a ge   a bove   is   to   c a l c ul a te   th e   m ode l' s   a c c ur a c y   in   pr e di c ti ng  c or r e c tl y,  w it h  a n  a c c ur a c y  v a lu e   of   0.9979.   T he   r a ti o  of   r e a l  pos it iv e   f or e c a s t s   to   a ll   pos it iv e   pr e di c ti on s   is   known  a s   pr e c i s io n,  r e s ul ti ng  in   0.9960.  T he   pe r c e nt a ge   of   r e a l  pos it iv e   in s ta nc e s   th a t  th e   m ode l  a c c ur a t e ly   de te c ts   is   kno w n  a s   r e c a ll ,  yi e ld in g  a   r e s ul t  of   1.000.  T he   F 1 - s c or e   is   th e   h a r m oni z a ti on  be twe e n  r e c a ll   a nd  pr e c is io n, r e s ul ti ng i n 0.9980.   F ig ur e   8  s how s   th a t  m ode l  e va lu a ti on  is   th e   pr oc e s s   of   a s s e s s in g  th e   pe r f or m a nc e   of   a   m ode l  th a t  ha s   be e n  tr a in e d  a nd  te s te d  us in g  f or e ig n  da ta .  T he   obj e c ti ve   is   to   e v a lu a te   th e   m ode l' s   pe r f or m a nc e   w he n  a ppl ie d t o unf a m il ia r  da ta . T he  f ol lo w in g i s  t he  r e s ul t  of  e a c h  s c o r e  i n t a bl e  f or m .   E a c h  s c or e   di s pl a ye d  in   T a bl e s   2   to   4  is   th e   r e s ul t  of   th e   m ode l' s   pe r f or m a nc e   e va lu a ti on  a ga in s t  th e   da ta   us e d.  T o  m e a s ur e   th e   m ode l  in   m a ki ng  a c c ur a te   pr e di c ti ons   ( a c c ur a c y) ,  to   a s s e s s   th e   tr ue   pos it iv e   pr e di c ti ons   c om pa r e d  to   th e   pos it iv e   pr e di c ti ons   m a de   by  th e   m ode l  f or   e a c h  c a te gor y  ( pr e c is io n) ,  th e n  to   e va lu a te   how   m a ny  a c tu a l  pos it iv e   c a s e s   a r e   c or r e c tl y  de te c te d  by  th e   m ode l  f r om   th e   to ta l  pos it iv e   c a s e s   ( r e c a ll ) ,  a nd  to   c a lc ul a te   th e   pr e c is io n  a nd  r e c a ll   ha r m oni c   m e a n,  w hi c h   pr ovi de s   a n   ove r a ll   pi c tu r e   of   th e   ba la nc e   be tw e e n  th e   two  ( F 1 - s c or e ) .   F ig ur e   9   s how s   th a t  th e   X G B oos t  m ode l  a c hi e ve d   th e   be s t  pe r f or m a nc e   w it h a n A U C  of  0.839 c om pa r e d t o  L R   ( 0.823) , l in e a r  S V M  ( 0.815) , a nd  RF   ( 0.812) .           F ig ur e  7. M ode l  tr a in           F ig ur e   8. M ode l  e va lu a ti on       T a bl e   2.   C onf us io n m a tr ix   va lu e s   T r ue   pos i t i ve   ( T P )   F a l s e  pos i t i ve   ( F P )   F a l s e  ne ga t i ve   ( F N )   T r ue   ne ga t i ve   ( T N )   33   0   2   69   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8814   I nt  J  A dv A ppl  S c i ,  V ol .  14 , N o.  4 ,  D e c e m be r   20 25 :  1028 - 1039   1036   T a bl e   3 .  M od e l  pe r f or m a nc e  r e s ul ts   D a t a   A c c ur a c y   P r e c i s i on    R e c a l l   F1 - s c or e   T r a i ni ng   99%   99%   100%   99%   T e s t i ng   98%   100%   97%   98%     T a bl e   4 .  C a te gor y of  e a c h c la s s   C a t e gor y   P r e c i s i on   R e c a l l   F1 - s c or e   D i a be t e s  ( 1)   94%   100%   97%   N on - d i a be t e s  ( 0)   100%   97%   99%             F ig ur e   9 .   R e c e iv e r  ope r a ti ng c ha r a c te r is ti c   ( R O C )   c ur ve s       4.4.   We b s it e   a p p e ar an c e   T he   de ve lo p e d  m ode l  ha s   th e n  be e n  im pl e m e nt e d  in   th e   f or m   of   a   w e bs it e   to   r e a c h   m a ny  pe opl e   out   th e r e  w ho ne e d pr e di c ti ons  of   D M   r is k ba s e d on the ir  he a lt h hi s to r y.   F ig ur e   10   s how s  t he  r e s ul ts  of  a  s e r ie s  of   pr oc e s s e s   th a t  o c c ur   a f te r   th e   u s e r   in put s   th e ir   he a lt h  hi s to r y  d a ta .  F ir s t,   it   in vol ve s   a   s t a nda r di z a ti on  pr oc e s s   f or   th e   da ta   th a t   ha s   be e n   e nt e r e d,   s o   th a t  th e   ne w ly   in put   va lu e s   a r e   on   a   di ve r s e   s c a le   ba s e d   on  th e   pa r a m e te r s   th a t  ha v e   be e n  pr oc e s s e d  by   th e   pr e vi ous ly   tr a in e d m ode l,   a nd  th e   r e s ul ts   w il l  b e   di s pl a y e d  on  th e   m a in   pa ge .  T he n   th is   m od e l  w il l  ge n e r a te   pr e di c ti ons   f or   di a be te s   r is k   a nd  th e   pr oba bi li ty   of   di a b e te s   r is k  ba s e d  on  th e   in put   da ta   pr ov id e d.  T he   m ode l  w il l   de te r m in e   w he th e r   th e   r is k  of   di a be te s   f r om   th e   e nt e r e d   da ta  i s  pos it iv e  ( in di c a ti ng dia be te s )  or  ne ga ti ve  ( doe s  not  i ndi c a te  di a be te s ).   T he   pr oba bi li ty   va lu e   of   di a be te s   r is k  i s   a   r e s ul t  w it h  a   v a lu e   b e twe e n  0  a nd  1  to   in di c a te   ho w   hi gh  th e   m ode l' s   c onf id e nc e   le ve l  is   in   pr e di c ti ng  w he th e r   s om e one  ha s   a   r is k  of   di a be te s   ba s e d  on  th e   gi ve n  da ta .  A   va lu e   of   0.5   ( 50% )   is   u s e d  a s   th e   th r e s hol d  d.   I f   th e   pr ob a bi li ty   va lu e   is   a bove   0.5  ( a ppr oa c hi ng   1) ,  it   m e a ns   th e   m ode l  is   ve r y  c onf id e nt   th a t  th e r e   i s   a   r is k  of   di a be te s ,  a nd   th e   r e s ul t  w il l  be   c la s s if ie d  in   th e   pos it iv e   c a te gor y  ( di a be t e s ) .  C o nv e r s e ly ,   if   th e   pr o ba bi l it y   v a l ue   i s   u nd e r   0. 5  ( a ppr o a c hi ng   0 ) ,   it   m e a n s   th e   m od e l  i s  v e r y   c onf id e nt  t ha t  t he r e   is  n o r i s k o f  d ia be te s ,   a nd  t h e   r e s ul t  w il l  b e   c l a s s if i e d  in  t h e   ne ga ti v e   c a t e gor y.           F ig ur e  10. M a in  di s pl a y   Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A dv A ppl  S c i     I S S N :   2252 - 8814       I m pl e m e nt at io n of  X G B oos t  fo r  di abe te s  m e ll it us  r i s k  pr e di c ti on bas e d on he al th  hi s to r y   ( A ndi  R ia ns y ah)   1037   5.   C O N C L U S I O N   T hi s   r e s e a r c h  de m ons tr a te s   th a t  th e   XG boos t  a lg o r it hm   s how s   opt im a l  a nd  a c c ur a te   pe r f or m a nc e   i n   c la s s if yi ng  th e   r is k  of   D M   ba s e d  on   he a lt h  hi s to r y  to   e nha n c e   e a r ly   di a gno s is ,   a c hi e vi ng  a n  a c c ur a c y  of   0.9808,  a  pr e c i s io n  of   1.000,   a  r e c a ll   of   0.9718,   a nd a n  F 1 - s c or e   of   0.9857. W it h  a   hi gh  le ve l   of   a c c ur a c y,  th e   m ode l  s uc c e s s f ul ly  pr e di c ts  w he th e r  a n i ndi vi dua l  is  a t  r is k of  h a vi ng dia be te s  ba s e d on the ir  m e di c a l  hi s to r y,   in  or de r  t o i m pr ove  e a r ly  di a gnos is .       A C K N O WL E D G M E N T S   T he   a ut hor s   gr a te f ul ly   a c knowle dge   th e   f in a nc ia l  s uppor t  pr ovi de d  by  th e   U ni ve r s it a s   I s la m   S ul ta n   A gung,  S e m a r a ng,  I ndone s ia   in   c ondu c ti ng  a nd  c om pl e ti ng   th is   s tu dy.   W e   w oul d  li ke   to   e xpr e s s   our   a ppr e c ia ti on  to   th e   ps yc hol ogi s ts   w ho  v e r if ie d  th e   da ta s e t  w e   c ol le c te d;   w it hout   th e ir   c ont r ib ut io ns ,  th is   r e s e a r c h  w oul d  not   ha ve   be e n  pos s ib le .  I n  a ddi ti on,  w e   a r e   ve r y  gr a te f ul   to   our   a c a de m ic   a dvi s or s   f or   th e ir   s uppor t  a nd  va lu a bl e   f e e dba c k  th r oughout  th is   r e s e a r c h  pr oc e s s .  T hi s   r e s e a r c h  is   de di c a te d  to   a ll   pa r ti e s   s tr iv in g t o i m pr ove  t he  qua li ty  of  m e nt a l  he a lt h c a r e  f or  a dol e s c e nt s  i n I ndone s ia .       F U N D I N G  I N F O R M A T I O N   T hi s  r e s e a r c h w a s  f unde d by Univ e r s it a s  I s la m  S ul ta n A gung, S e m a r a ng, I ndone s ia .        A U T H O R  C O N T R I B U T I O N S  S T A T E M E N T   T hi s   jo ur na l  us e s   th e   C ont r ib ut or   R ol e s   T a xonomy  ( C R e di T )   to   r e c ogni z e   in di vi dua l   a ut hor   c ont r ib ut io ns , r e duc e  a ut hor s hi p di s put e s ,  a nd f a c il it a te  c ol la bo r a ti on.     N am e  o f  A u t h or   C   M   So   Va   Fo   I   R   D   O   E   Vi   Su   P   Fu   A ndi  R ia ns ya h   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   G huf r on   ✓   ✓     ✓   ✓   ✓       ✓   ✓       ✓     L a il a tu l  F it r iy a h   ✓   ✓   ✓     ✓   ✓   ✓     ✓   ✓   ✓         S uya nt o   ✓   ✓       ✓         ✓               C   :    C onc e pt ua l i z a t i on   M   :    M e t hodol ogy   So   :    So f t w a r e   Va   :    Va l i da t i on   Fo   :    Fo r m a l  a na l ys i s   I   :    I nve s t i ga t i on   R   :    R e s our c e s   D   :   D a t a  C ur a t i on   O   :   W r i t i ng  -   O r i gi na l  D r a f t   E   :   W r i t i ng  -   R e vi e w  &   E di t i ng   Vi   :    Vi s ua l i z a t i on   Su   :    Su pe r vi s i on   P   :    P r oj e c t  a dm i ni s t r a t i on   Fu   :    Fu ndi ng a c qui s i t i on         C O N F L I C T  O F  I N T E R E S T  S T A T E M E N T   T he   a ut ho r s   de c la r e   t ha t   th e y   ha ve   n o  kn ow n   c on f l ic ts   o f   i nt e r e s t,   w he th e r   f in a nc ia l   or     non - f i na nc ia l ,  th a t  c ou ld   ha ve   in f l ue nc e d  th e   c o nd uc t   o r   ou tc om e s   o f   th is   r e s e a r c h .  T h e   s t ud y  w a s   c a r r ie d   out   i nde pe n de n tl y ,  a nd   a l l  a na l ys e s ,   i nt e r p r e ta t io ns ,  a nd   c o nc lu s i ons   a r e   ba s e d  s ol e ly   on   t he   da ta   o bt a in e d   a nd   th e   m e t ho do lo g ie s   a pp l ie d   by   th e   a u th or s .  T he   a ut ho r s   a l one   a r e   r e s pons ib le   f or   th e   c o nt e nt   a n d   w r it in g  o f   th is  p a pe r .       D A T A  A V A I L A B I L I T Y   T he   da ta s e t  us e d  in   th is   s tu dy  to   de ve lo p  a nd  e va lu a te   th e   X G B oos t - ba s e d  di a be te s   r is k  pr e di c ti on  m ode l  c ons is t s   of   a nonymi z e d  p a ti e nt   he a lt h  r e c or ds   de r iv e d  f r om   hi s to r ic a l  he a lt h  da ta .  A ll   p e r s ona l   id e nt if ie r s   w e r e   r e m ove d  pr io r   to   a na ly s i s   to   e n s ur e   c om pl ia n c e   w it h  e th ic a l   a nd  pr iv a c y  s ta nda r ds .   D ue   to   in s ti tu ti ona l  a nd  pr iv a c y  r e s tr ic ti ons ,  th e   r a w   da ta   a r e   not   publ ic ly   a va il a bl e ,  but   th e y  m a y  be   obt a in e d  f r o m   th e  c or r e s ponding a ut hor   [ A R ]   upon r e a s ona bl e  r e que s t  a nd w it h pe r m is s io n f r om  t he  r e le va nt  da ta  ow ne r .       R E F E R E N C E S   [ 1]   Y .  L i   e t   al . ,  “ A s s o c i a t i on  of   a ge   a t   di a gno s i s   of   t ype   2  di a b e t e s   m e l l i t us   w i t h  t he   r i s ks   of   t he   m or bi di t y  of   c a r di ova s c ul a r   di s e a s e ,   c a nc e r   a nd  a l l - c a u s e   m or t a l i t y:   e vi de nc e   f r om   a   r e a l - w or l d  s t udy  w i t h  a   l a r ge   popul a t i on - ba s e d  c ohor t   s t udy,”   D i abe t e s   R e s e ar c h   and C l i ni c al  P r ac t i c e , vol . 217, N ov. 2024, doi :  10.1016/ j .di a br e s .2024.111870.   [ 2]   J .  H .  W e r s ä l l ,  P .  A dol f s s on,  J .  E ke l und,  G .  F or s a nde r ,  K .  Å ke s s on,  a nd  R .  H a na s ,  “ I s   di a be t i c   ke t oa c i dos i s   a t   di a gnos i s   of   t y pe   1   di a be t e s   a s s oc i a t e d  w i t h  s e c onda r y  e pi s ode s   of   ke t oa c i dos i s ?   a   na t i onw i de   l ongi t udi na l   s t udy  of   S w e di s h  c hi l dr e n  f r om   2012   t o   2019,”   D i abe t e s  R e s e a r c h and C l i ni c al  P r ac t i c e , vol . 225, J ul . 2025, doi :  10.1016/ j .di a br e s .2025.112282.   Evaluation Warning : The document was created with Spire.PDF for Python.