I nd o ne s ia n J o urna l o f   E lect rica l En g ineering   a nd   Co m p u t er   Science   Vo l.   1 2 ,   No .   1 Octo b er   201 8 ,   p p .   1 5 5 ~ 1 6 0   I SS N:  2502 - 4752 ,   DOI : 1 0 . 1 1 5 9 1 / i j ee cs . v 1 2 .i 1 . p p 155 - 1 6 0           155       J o ur na l ho m ep a g e h ttp : //ia e s co r e. co m/jo u r n a ls /in d ex . p h p / ijeec s   Neig hbo r Weigh t ed K - Nea res Nei g hbo r f o r Sa m ba t  O nlin Cla ss ificatio n       Anni s y a   April ia   P ra s a nti,   M .   Ali F a uzi,  M .   T a nzil F urqo n   F a c u lt y   o f   Co m p u ter S c ien c e ,   Bra w ij a y a   Un iv e rsit y ,   M a lan g ,   In d o n e sia       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Ma y   6 ,   2 0 1 8   R ev i s ed   Ma y   2 9 ,   2 0 1 8   A cc ep ted   J u n   1 6 ,   2 0 1 8       S a m b a t   On li n e   is  o n e   o f   th e   i m p l e m e n tatio n   o f   E - G o v e rn m e n f o c o m p lain ts  m a n a g e m e n p ro v id e d   b y   M a lan g   Cit y   G o v e rn m e n t.   A ll   o f   th e   c o m p lain ts   w il b e   c las sif ied   in to   it in ten d e d   d e p a rtm e n t.   In   th is  stu d y ,   a u to m a ti c   c o m p lain c las sif ic a ti o n   sy ste m   u sin g   Ne ig h b o W e ig h ted   K - Ne a re st   Ne ig h b o (NW - KN N)  is  p o p o se d   b e c a u se   S a m b a On li n e   h a im b a lan c e d   d a ta.  T h e   s y ste m   d e v e lo p e d   is  c o m p o se d   o f   th re e   m a jo p h a se in c lu d i n g   p re p ro c e ss in g ,   N - G ra m   f e a tu re   e x trac ti o n ,   a n d   c las sif ic a ti o n   u s in g   NW - KN N.  Ba se d   o n   t h e   e x p e rim e n t   r e su lt s,  it   c a n   b e   re su m e d   th a th e   NW - KN N   a lg o rit h m   is  a b le  to   c las sify   th e   i m b a lan c e d   d a ta  w e ll   w it h   th e   m o st  o p ti m a k - n e ig h b o v a lu e   is  3   a n d   u n ig ra m   a th e   b e st  f e a tu re b y   7 7 . 8 5 %   p re c isio n ,   7 4 . 1 8 %   re c a ll ,   a n d   7 5 . 2 5 %   f - m e a su re   v a lu e .   Co m p a re d   to   th e   c o n v e n ti o n a l   KN N,  NW - KN a lg o rit h m   a lso   p ro v e d   to   b e   b e tt e f o im b a lan c e d   d a ta  p ro b lem w it h   v e r y   slig h d iff e re n c e s.   K ey w o r d s :   T ex t Cl ass i f icat io n   Sa m b at  O n li n e   N - Gr a m   NW - KNN   Neig h b o r   W eig h ted   K - Nea r e s t   Neig h b o r .   Co p y rig h ©   2 0 1 8   In stit u te o A d v a n c e d   E n g i n e e rin g   a n d   S c ien c e   Al rig h ts  re se rv e d .   C o r r e s p o nd ing   A uth o r :   M.   A li Fa u zi   Facu lt y   o f   C o m p u ter   Scien ce ,   B r a w ij ay U n i v er s it y ,     Ma lan g ,   I n d o n esia.   E - m a il:  m o c h . ali. f au zi @ u b . ac . id       1.   I NT RO D UCT I O N   E lectr o n ic  g o v er n m e n ( e - g o v er n m e n t)   h as  b ec o m a n   e m er g i n g   tr e n d   f o r   th e   p ast  t w o   d ec ad es.   No w ad a y s ,   e - g o v er n m e n is   n o li m ited   to   th d ev elo p ed   co u n tr ie s .   T h er ar e   s o m i n n o v ativ e - g o v er n m en t   ap p licatio n   in   th d ev elo p in g   co u n tr ies,  as  I C T s   ar b ein g   g r o w i n g l y   u s ed   b y   g o v er n m en an d   co n n ec it   m o r c l o s el y   w it h   t h eir   cit ize n s .   W it h   t h ap p licatio n   o f   e - g o v er n m e n t,  t w o - w a y   co m m u n ica tio n   b et w ee n   citizen s   an d   g o v er n m e n ca n   b d ev elo p ed   ea s il y .   C itizen s   ca n   co n v e y   th e ir   asp ir atio n ,   c r itics ,   o r   o p in io n   to   th g o v er n m en w ith o u an y   d if f icu lties   [ 1 ] .   SA MB A T   On li n is   o n o f   t h i m p le m en tati o n   o f   e - g o v er n m e n t   p r o v id ed   b y   Di s k o m i n f o   ( C o m m u n icatio n   an d   I n f o r m ati o n   Dep ar t m e n t)   o f   Ma lan g   cit y   g o v er n m en t.   S A MB A T   On li n is   an   ap p licatio n   f o r   co m p lai n s y s te m   th at  en ab le  p eo p le   o f   Ma lan g   cit y   to   ex p r ess   th ei r   o p in io n s ,   s u g g esti o n s ,   cr itic i s m s ,   q u e s tio n s   o r   co m p lai n t s   ab o u t h p er f o r m an ce   o f   p u b lic  f ac i liti e s   o r   s er v ices  h eld   b y   t h g o v er n m en t.  F u r th er m o r e,   Di s k o m i n f o   w il v er i f y   an d   ac ce p all  i n c o m in g   co m p lai n t s .   T h ey   al s o   h av to   s o r an d   cl ass i f y   t h co m p lai n ts   b ased   o n   th i n te n d ed   d ep ar tm en m a n u al l y .   Ob v io u s l y ,   w it h   th e   lar g e   n u m b er   o f   in co m i n g   co m p lai n ts ,   t h is   p r o ce s s   is   e x p en s i v a n d   ta k es   lo o f   ti m e.   He n ce ,   a n   au to m at ic  co m p lai n ts   cla s s i f ic atio n   is   r eq u ir ed .   Sa m b at  On lin clas s i f icatio n   ca n   b co n s id er ed   as  to p ica tex class i f icat io n .   Var io u s   tr ad itio n al  m ac h in lear n in g   m e th o d s   h av b ee n   ap p lied   to   s o lv th is   p r o b lem   s u ch   as  Naï v B a y es  [ 2 - 6 ] ,   Su p p o r Vec to r   Ma ch in e s   [ 7 - 8 ] .   K - N ea r est  Neig h b o r s   [ 9 - 1 2 ] ,   Neu r al  Net w o r k   [ 1 3 - 1 4 ] .   T h ese  m et h o d s   h a v b ee n   s h o w n   to   p r o v id e x ce lle n p er f o r m a n ce   in   tex clas s i f ic atio n .   Ho w e v er ,   Sa m b at   o n l in d atase is   a n   i m b alan ce d   d ata.   T h p er f o r m an ce   o f   th e s m e th o d s   h a s   en co u n ter ed   s ig n i f ican d r aw b ac k   w h e n   d ea lin g   w it h   i m b ala n ce d   d ata  [ 1 5 - 1 6 ] .   T h i m b ala n ce   d ata  is s u r is e s   f r eq u en t l y   i n   cl u s ter i n g   an d   class i f ica tio n   s ce n ar io s   w h e n   th a m o u n t o f   d ata  w it h   p ar ticu lar   cla s s   i s   m u c h   m o r th a n   t h d ata  in   t h o th er   class e s   [ 1 7 ] .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l 1 2 ,   No .   1 Octo b er   201 8     1 5 5     160   156   T r a d itio n al  m ac h in lear n in g   m et h o d s   ten d   to   b f lo o d ed   b y   t h m aj o r   class   an d   n eg lect   th m i n o r   o n es  as  th e y   ar ap p lied   to   s u ch   s k e w e d   d ata  [ 1 8 ] .   On o f   th i m p r o v ed   m ac h i n lear n in g   m et h o d s   d ev o ted   t o   tack le  t h is s u o f   i m b a lan ce d   d ata  is   Neig h b o r   W eig h ted   K - Nea r es Neig h b o r   ( NW - KNN) .   NW - KNN  is   an   i m p r o v ed   K - Nea r est  Neig h b o r   ( KNN)   m et h o d   p r o p o s ed   b y   T an   [ 1 9 ]   th at  ad d in g   w ei g h ti n g   s tag e   to   s o lv i m b a lan ce d   d ata  p r o b le m s .   T h is   m et h o d   ass i g n s   s m all  w ei g h v al u to   th n ei g h b o r s   co m i n g   f r o m   th m aj o r it y   class   a n d   ass i g n s   lar g er   w eig h t   v alu to   t h n ei g h b o r s   f r o m   m i n o r it y   cla s s e s .   T h is   m et h o d   p r o v e n   to   o b tain   s ig n if ican i m p r o v ed   p er f o r m a n ce   o n   i m b ala n ce d   d ata.   I n   th is   s tu d y ,   w i m p le m e n t h NW - KNN  m et h o d   f o r   Sam b at  On lin clas s i f icatio n .   W u s co s i n e   s i m ilar it y   f o r   m ea s u r i n g   te x p r o x i m it y   to   d eter m i n n ei g h b o r s   in   NW - KNN.   W al s o   u s N - g r a m   f ea t u r es   to   i m p r o v t h e   p er f o r m a n ce   o f   t h is   clas s i f icatio n   m et h o d   d u e   to   it s   p r o m is in g   p er f o r m a n ce   as  co m b in ed   w it h   co s in s i m ilar it y   [ 2 0 ] .   B y   ap p ly in g   th e   NW - K NN  m et h o d   s u p p o r ted   b y   N - g r a m   f ea t u r ex tr ac tio n ,   i i s   ex p ec ted   th at  t h class if ica tio n   s y s te m   ca n   h a n d le  th i m b al an ce   d ata  class i f icatio n   p r o b lem   w ell.         2.   RE S E ARCH   M E T H O D   As  d ep icted   in   Fi g u r 1 ,   Sa m b at  On li n clas s i f icatio n   in   t h i s   s tu d y   is   co m p s ed   o f   th r ee   m aj ir   p h ases :   1 )   p r e p r o ce s s in g ; 2 )   N - g r a m   f ea tu r ex tr ac tio n ; a n d   3 )   class i f icatio n   u s in g   NW - KNN.             Fig u r 1 .   Sa m b at  On lin C las s if icatio n   S y s te m   Ma i n   Flo w c h ar t       2 . 1 .   Do cu m ent   P re pro ce s s i ng   P r ep r o ce s s in g   i s   p r o ce s s   t h a ai m s   to   p r ep ar r a w   d o cu m e n ts   b ef o r b ein g   p r o ce s s ed ,   ei th er   f r o m   tr ain i n g   d o cu m e n ts   o r   test   d o cu m e n ts .   T h er ar s o m s tep s   in cl u d ed   in   d o cu m e n p r ep r o ce s s in g   s ta g in cu d i n g   to k e n izatio n ,   f il ter in g ,   a n d   s te m m i n g .   I n   th f ir s s tep ,   th d o cu m en is   s p li tted   in to   s m aller   u n it s   ca lled   to k en s   o r   ter m s   [ 2 1 - 2 2 ] .   I n   th is   s tep ,   all  o f   ch ar ac ter s   ar co n v er ted   in to   lo w er ca s an d   p u n ctu at io n ,   n u m b er s ,   h t m ta g   a n d   ch ar a cter s   o u ts id o f   t h alp h ab et  ar also   r e m o v ed .   T h n ex t   s tep   is   f il ter in g   o r   r e m o v i n g   u n i n f o r m ati v w o r d s   ca lled   s to p lis b ased   o n   a n   ex is tin g   s to p lis d ictio n ar y   b y   T ala  [ 2 3 ] .   T h f o u r t h   s tep   is   s te m m i n g .   I n   s t e m m in g ,   ev er y   w o r d s   is   co n v er ted   to   its   r o o [ 2 4 - 25] Fo r   ex a m p le,   t h w o r d s   j alan ,   d ij alan k a n ,   an d   p er j alan an   w i ll b co n v er ted   to   th s a m w o r d   j alan .     2 . 2 .   N - G ra m   F ea t ures E x t ra ct io n   N - Gr a m   is   s lice  o f   n - w o r d   o b tain ed   f r o m   d o cu m e n [ 2 6 ] .   T h n   ca n   v ar ies  f r o m   1   ( u n i g r a m ) ,   2   ( b ig r a m ) ,   3   ( tig r a m ) ,   4 ,   an d   s o   o n .   I n   t h i s   w o r k ,   w e   u s u n i g r a m ,   b ig r a m ,   a n d   co m b i n atio n   o f   t h e m .   Fo r   ex a m p le,   if   w h av e   d o cu m en t h at  co n tain   s e n te n ce :   “w e   ea r ice” ,   t h en   t h N - g r a m   f ea t u r es  o f   t h is   d o cu m en t is p r esen ted   in   T ab l 1 .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       N eig h b o r   W eig h ted   K - N ea r e s t   N eig h b o r   fo r   S a mb a t O n lin C la s s i fica tio n   ( M.  A li F a u z i )   157   T ab le  1 .   N - Gr a m   Feat u r E x tr ac tio n   R es u lt   U n i g r a m   B i g r a m   C o mb i n a t i o n   o f   U n i g r a a n d   B i g r a m   we   e a t   w e   e a t   e a t   r i c e   we   e a t   r i c e     r i c e   w e   e a t   e a t   r i c e       Fu r t h er m o r e,   w r ep r esen th e   f ea t u r es  w i th   T F.I DF  w ei g h ti n g .   T F.I DF  is   th e   m o s h ig h l y   e m p lo y ed   ter m   w ei g h tin g   al g o r ith m   i n   d o cu m e n clas s i f icatio n   [ 2 7 ] .   T F. I DF  in co r p o r ate   ter m   f r eq u en c y   ( T F)  an d   in v er s d o cu m e n f r eq u e n c y   ( I DF) .   T h T F.I DF  w eig h o f   ter m   f ea tu r in   d o cu m e n d   is   f o r m u lated   a s   f o llo w s :     ) l o g 1 ( ) l o g 1 ( ) , ( , t d d t df N f d t I D F TF     W h er d t f ,   is   t h n u m b er   o f   o cc u r r en ce s   o f   f ea t u r i n   d o cu m en d   an d   d N   is   t h n u m b er   o f   d o cu m en i n   d ataset  .   an d   t df   is   th n u m b er   o f   d o cu m e n in   d ataset  t h at  co n tai n s   f ea t u r t.  T h is   f ea tu r r ep r esen tati o n   w il b u s ed   in   th cla s s i f ica tio n   s ta g e.     2 . 3 .   Cla s s if ica t io n us i ng   NW - K NN   T h last   s tag is   d o cu m en class i f icatio n   u s i n g   Ne ig h b o r   W eig h ted   K - Nea r est  Ne ig h b o r   ( NW - KNN) .   E ac h   co m p lain w ill  b class i f ied   b ased   o n   th i n te n d ed   d ep ar tm e n t.  NW - KN is   m o d if icat io n   o f   KNN  alg o r it h m   to   s o lv th p r o b lem   o f   i m b ala n ce d   d ata.   T h i n itia s tag is   f i n d in g   k   n e ar est  n ei g h b o r s   b y   ca lcu lati n g   th d i s tan ce   o r   s i m ilar it y   b et w ee n   th te s ti n g   a n d   tr ain i n g   d ata.   C o s i n s i m il ar it y   is   u s ed   i n   t h i s   s tu d y   f o r   th o s tas k .   T h ap p licatio n   o f   NW - KNN  al g o r it h m   is   n o m u ch   d i f f er en f r o m   tr ad itio n al  K NN   a lg o r ith m .   T h o n l y   d if f er e n c b et w ee n   t h t w o   alg o r it h m s   lies   in   t h ca lcu latio n   clas s   weig h t.  I n   tr ad itio n al  KNN,   ea ch   c lass   h a s   t h s a m e   w ei g h t.  O n   t h o th er   h a n d ,   N W - KNN  g i v t h m in o r it y   cla s s   g r ea ter   w ei g h t,   w h ile  t h m aj o r it y   clas s   w ill b g iv e n   s m aller   w ei g h t.  T h w eig h t o f   ea ch   cla s s   i s   ca lcu la te d   as f o llo w s :                     (      (       ) (     {      (       )                       } ) )            W h er               is   t h w ei g h o f   class          (       )   is   t h n u m b er   o f   tr ain in g   d ata  i n   clas s         {      (       )                       }   is   t h least  n u m b er   o f   d ata  tr ain i n g   i n   ea c h   cla s s ,   an d          is   co n s ta n m ag i c   n u m b er   th at  i ts   v a lu u s u all y   m o r t h a n   1 .   I n   th is   s tu d y ,   w u s 2   as t h        v al u e.     T h is   w ei g h t,  alo n g s id w it h   t h k   n ea r est  n eig h b o r s ,   w il b u s ed   to   ca lcu late  th s co r f o r   ea ch   class .   T h clas s   w i th   h i g h est  s co r w ill b t h c lass   o f   t h te s t d ata.   T h ca lcu la tio n   o f   t h s co r es o f   ea c h   cla s s   ca n   b ca lcu lated   as  f o llo w s :             (         )               (     (        )   (          )           (   ) )     w h er       (         )   is   t h s co r o f   clas s       f o r   test i n g   d ata                 i s   th w ei g h o f   cla s s               (   )   is   s e o f   tr ai n i n g   d ata  th at   l o ca ted   th k   n ea r est  n ei g h b o r   o f   th e   test   d ata    ,   an d       (        )   is   th s i m ilar it y   b et w ee n   tr ain i n g   d ata       an d   test in g   d ata    .   W e   em p lo y   co s i n s i m ilar it y   f o r   th is   m ea s u r e.   Me an w h ile,     (          )   is   th b in ar y   w ei g h th at  h as  v al u o f   1   if   tr ain i n g   d ata       is   b elo n g   to   class     Oth er w h is e,   its   w eig h t   w ill   b 0 .   B y   u s i n g   t h is   f o r m u la,   N W - KNN  ca n   h a n d le  m aj o r ity   class   d o m in a n ce   in   i m b alan ce d   d ata  b ec au s it  g i v lo w er   w eig h f o r   m aj o r ity   cl ass   an d   h ig h er   clas s   f o r   th m i n o r it y   o n e.       Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l 1 2 ,   No .   1 Octo b er   201 8     1 5 5     160   158   3.   RE SU L T S AN AN AL Y SI S   T h d ata  u s ed   in   th is   s t u d y   is   tak en   f r o m   S A MB A T   On lin e.   T h tex o f   th co m p lai n is   t ak en   f r o m   3   d ep a r tm e n t s   in cl u d in g   Dep ar t m en o f   T r an s p o r tatio n   o r   Din as  P er h u b u n g an   ( DI SHU B ) ,   Dep a r tm e n o f   San itat io n   a n d   P ar k s   o r   Di n as  Keb er s ih a n   d an   P er ta m a n a n   ( DKP ) ,   an d   Dep ar t m en t   o f   P u b lic  W o r k s ,   Ho u s in g   an d   B u ild in g   Su p er v is io n   o r   Din as  P ek er j aa n   U m u m ,   P er u m a h a n   d an   P en g a w a s an   B a n g u n an   ( DP UP P B ) .   T o tal  d ata  u s ed   is   3 1 0   d iv id ed   in t o   2 3 7   tr ain in g   d ata  an d   7 3   test   d ata.   T h tr ain in g   d at co n s is o f   2 7   d ata  f o r m   DKP   class ,   4 9   d ata  f o r m   DP UP P B   class   an d   1 6 1   d a ta  f r o m   DI SHUB .   Me an w h i le ,   th test   d ata  u s ed   co n s is t o f   1 3   d ata  f r o m D KP   class ,   2 1   d ata  f r o m   DP UP PB   a n d   3 9   d ata  f r o m   DI SHUB   cla s s .   T h er ar th r ee   ex p er im e n s c en ar io s   p er f o r m ed   o n   t h is   s tu d y .   F ir s tl y ,   th e x p er i m e n i s   f o cu s ed   o n   th ef f ec o f   k   v al u es  o f   NW - KNN  a n d   f i n d i n g   t h m o s o p ti m al  v alu o f   k .   h f o llo w i n g   e x p er i m e n i s   i s   f o cu s ed   o n   th e f f ec o f   N - Gr a m   as  f ea t u r es  f o r   clas s f ic itio n   u s i n g   NW - KNN.   I n   th last   o n e,   w w ill   co m p ar th p er f o r m a n ce   o f   NW - KNN  an d   co n v en tio n al  KNN  m et h o d .   W u s p r ec is io n ,   r ec all,   an d   f - m ea s u r f o r   ev al u atio n   in   all  o f   th e s ex p er i m en ts .     3 . 1 .   K   Va lue V a ria t io n E x peri ment   I n   th is   e x p er i m e n t,  w p er f o r m ed   co m p ar is o n   o f   k   v al u es   v ar iatio n s   o f   1 ,   3 ,   5 ,   7   an d   1 5 .   Un ig r a m   ( B ag   o f   W o r d )   is   u s ed   f o r   th is   ex p er i m e n t.  T ab le   2   s h o w s   th r esu l o f   th is   e x p er i m e n t.  T h r esu lts   d ep icts   th at  g e n er all y   th e   p er f o r m a n c o f   t h is   clas s i f icatio n   s y s te m   is   d ec r ea s i n g   as   th e   v a lu e   o f   k   i s   g etti n g   h ig h er .   T h is   is   b ec au s t h h ig h er   t h e   v al u o f   k ,   t h h ig h er   t h p r o b ab ilit y   o f   n ei g h b o r s   t h at  h a v f u r th er   d is ta n ce s   ar also   co n s id er ab ly   ta k en   i n to   co n s id er atio n .   T h is   f ar   n eig h b o r s   ca n   b th ir r elev an f o r   ch o o s in g   th r i g h t   class .   T h v alu o f   k =3   h as  t h m o s o p ti m al  p er f o r m a n ce   with   7 7 . 8 5 p r ec is io n ,   7 4 . 1 8 % r ec all,   an d   7 5 . 2 5 %   f - m ea s u r v al u e.   Ho w e v er ,   th v alu o f   k =1   h a s   t h m o s in f er io r   p er f o r m a n ce   w it h   f - m ea s u r v al u o n l y   6 5 . 5 1 b ec au s it o n l y   co n s id er   o n n eig h b o r   th at  ca n   b v e r y   b ia s ed .       T ab le  2 .   Valu Var iatio n   E x p er im e n R es u lt.   K   V a l u e   P r e c i so n   R e c a l l   F - M e a su r e   1   6 9 . 6 0 %   6 3 . 5 1 %   6 5 . 5 1 %   3   7 7 . 8 5 %   7 4 . 1 8 %   7 5 . 2 5 %   5   7 5 . 1 3 %   6 8 . 3 1 %   7 0 . 6 0 %   7   7 6 . 5 1 %   6 8 . 3 1 %   7 0 . 9 5 %   15   7 4 . 0 2 %   6 4 . 5 0 %   6 7 . 0 2 %       3 . 2 .   N - G ra m   Va ria t io E x peri ment   I n   th is   e x p er i m e n t,  t h v ar iet y   o f   N - Gr a m   u s ed   w er u n i g r a m ,   b ig r a m   a n d   co m b i n atio n   o f   b o th   a s   f ea u r e s .   T h is   ex p er i m en is   co n d u ce ted   u s in g   k =3   as  T ab le  3   s h o w s   th r esu lt.  As  s ee n   o n   T ab le  3 ,   u n ig r a m   f ea t u r s h o w s   th e   b est  p er f o r m an ce   co m p ar ed   to   t h o t h er s   w it h   7 7 . 8 5 p r ec is io n ,   7 4 . 1 8 r ec all,   an d   7 5 . 2 5 f - m ea s u r v al u e.   Me an w h ile,   th w o r s p er f o r m a n ce   is   o b tain ed   w h e n   b ig r a m   i s   e m p lo y ed   w i th   f - m ea s u r v al u o n l y   4 8 . 5 1 %.  T h is   is   b ec au s m an y   o f   B ig r a m ' s   ter m s ,   w h ich   i s   co m b i n atio n   o f   t w o   w o r d s ,   r ar ely   ap p ea r   o n   m o r e   th a n   o n d o cu m e n t.  I t   is   o f te n   o n l y   o cc u r s   i n   th e   d o cu m en t   w h er t h ter m   i s   lo ca ted .   I is   v er y   d if f er en f r o m   u n ig r a m   f ea t u r th at  o n l y   co n s i s o n w o r d .   I m a k es  t h is   f e tau r e s   ca n   b o cc u r s   in   lo t o f   d o cu m e n ts .       T ab le  3 .   N - G r a m   Var iatio n   E x p er im e n R es u lt.   K   V a l u e   P r e c i so n   R e c a l l   F - M e a su r e   U n i g r a m   7 7 . 8 5 %   7 4 . 1 8 %   7 5 . 2 5 %   B i g r a m   5 5 . 8 5 %   4 6 . 4 4 %   4 8 . 5 1 %   C o mb i n a t i o n   o f   U n i g r a a n d   B i g r a m   7 0 . 5 1 %   6 9 . 5 7 %   6 9 . 5 7 %       3 . 3 .   NW - K NN  a nd   K NN  Co m pa riso n E x peri m ent   A   co m p ar i s o n   o f   KNN  a n d   NW - KNN  al g o r ith m   i s   p er f o r m ed   in   t h is   e x p er i m e n t.  T h u n i g r a m   f ea t u r is   u s ed   in   t h is   e x p er im en w it h   v ar iatio n s   o f   k   n ei g h b o r in g   v a lu e s   u s ed   in cl u d 1 ,   3 ,   5 ,   7 ,   an d   1 5   as  F ig u r 2   s h o w s   t h r es u lt.  T h r esu lt  d ep icts   t h at  g e n er al l y   NW - KNN  al g o r ith m   s h o w s   b etter   p er f o r m a n ce   th an   co n v e n tio n al   KNN   al g o r ith m s   a s   th e   k   v a lu e   g e tti n g   b ig g er .   T h is   i s   b ec a u s e   th e   d is tr ib u tio n   o f   th e   a m o u n o f   tr ai n in g   d ata  in   e ac h   class   is   im b ala n ce d .   As  th n ei g h b o r in g   v al u e   of   k   g r o w s   b ig g er ,   KNN  alg o r ith m te n d   to   co n s id er   f ar   n eig h b o r s   th at  o f te n   b elo n g   to   th class   th at  h as  th h ig h e s a m o u n o f   tr ain i n g   d ata.   A s   th r esu lt,  b y   u s i n g   KNN,   w il b lo t   o f   test in g   d ata  th at  class i f ied   in to   m aj o r it y   class   e v en   t h o u g h   it  s h o u ld   n o t.  Me an w h i le,   th is   p r o b l em   ca n   b av o id ed   b y   NW - KNN  al g o r it h m   b ec au s it  g i v es  lo w er   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       N eig h b o r   W eig h ted   K - N ea r e s t   N eig h b o r   fo r   S a mb a t O n lin C la s s i fica tio n   ( M.  A li F a u z i )   159   w ei g h ts   f o r   m aj o r ity   c lass   an d   h i g h er   w eig h f o r   t h m i n o r ity   o n e.   T h b est   p er f o r m a n ce   i s   s h o w ed   b y   NW - KNN  w h e n   u s in g   k   v al u o f   2   w it h   7 5 . 2 5 f - m ea s u r v al u e ,   w h ile  KNN  also   s h o w s   it s   b est  p er f o r m an ce   at   th s a m k   v al u w it h   s li g h t d if f er en ce   v a lu o f   f - m ea u s r o f   7 5 . 2 1 %.           Fig u r 2 .   KNN  an d   NW - KNN   C o m p ar is o n   R es u lt       4.   CO NCLU SI O N   I n   t h is   w o r k ,   Nei g h b o r   W eig h ted   K - Nea r es Nei g h b o r   ( NW - KNN)   w as   u s ed   f o r   i m b ala n ce d   Sa m b at   On li n clas s i f icatio n .   T h s y s te m   d ev elo p ed   is   co m p o s ed   o f   t h r ee   m aj o r   p h ases   i n cl u d in g   p r ep r o ce s s in g ,   N - Gr a m   f ea t u r ex tr ac tio n ,   a n d   class i f icat io n   u s i n g   NW - KN N.   B ased   o n   t h e x p er i m e n t   r esu lt s ,   it  ca n   b e   r esu m ed   th a t h NW - KNN  a lg o r ith m   i s   ab le  to   cla s s i f y   t h i m b ala n ce d   d ata  w ell  w it h   t h m o s o p ti m al  k - n eig h b o r   v al u is   3   an d   u n i g r a m   as  t h b est  f ea t u r es  b y   7 7 . 8 5 p r ec is io n ,   7 4 . 1 8 r ec all,   an d   7 5 . 2 5 f - m ea s u r v al u e.   T h is   s t u d y   s h o w   t h at  g r ea ter   v al u o f   k   d ec r ea s th f - m ea s u r v al u o f   cl ass i f icatio n   s y s te m .   T h is   s tu d y   al s o   d ep ict  th at  th b ig r a m   a n d   co m b i n atio n   o f   b o th   u n i g r a m   a n d   b ig r a m   f ail  to   i m p r o v th e   s y s te m   p er f o r m a n ce .   C o m p ar ed   to   th co n v e n tio n al   KNN ,   NW - KNN  a lg o r it h m   p r o v ed   to   b b etter   f o r   i m b alan ce d   d ata  p r o b lem s   as   th v al u o f   k   n eig h b o r s   g e ttin g   g r ea ter   b ec au s it  g iv e s   lo w er   w ei g h t s   f o r   m aj o r ity   clas s   a n d   h ig h er   w e ig h f o r   th e   m in o r it y   o n e.   S o m e   f u t u r w o r k s   th at   ca n   b co n d u cted   i s   t h e   d etec tio n   o f   ab b r ev iated   w o r d s   an d   s la n g   w o r d s   b ec au s e   m a n y   co m p lai n ts   i n   Sa m b at  O n li n ar w r itte n   u s in g   th at  k in d   o f   w o r d s .       RE F E R E NC E S   [1 ]     A n a n d it a   N.  El e m e n   S u k se   G o v e rn m e n t:   S tu d Ka su L a y a n a n   A sp iras Da n   P e n g a d u a n   On li n e   Ra k y a t   (L a p o r! Ko ta Ba n d u n g .   Un iv e rsitas   Ka to li k   P a ra h y a n g a n ,   Ba n d u n g .   2 0 1 6 .   [2 ]     F a u z M A ,   A ri f in   A Z,   G o sa ria  S C.   In d o n e sia n   Ne w Clas sif i c a ti o n   Us in g   Na ïv e   Ba y e a n d   Tw o - P h a se   F e a tu re   S e lec ti o n   M o d e l.   In d o n e sia n ”.   J o u rn a o El e c trica E n g i n e e rin g   a n d   Co mp u ter   S c ien c e   ( IJ EE CS ) .   2 0 1 7   De c   1 ;8 ( 3 ):6 1 0 - 5.   [3 ]     A n ti n a sa ri  P ,   P e r d a n a   RS ,   F a u z M A .   A n a li sis  S e n ti m e n   Ten tan g   Op in F il m   P a d a   D o k u m e n   Tw it ter  Be rb a h a sa   In d o n e sia   M e n g g u n a k a n   Na iv e   Ba y e De n g a n   P e rb a ik a n   Ka ta  T id a k   Ba k u J u rn a Pe n g e mb a n g a n   T e k n o l o g i   In fo rm a si   d a n   Ilm u   K o mp u ter .   2 0 1 7 1 (1 2 ): 1 7 3 3 - 41.   [4 ]     G u n a w a n   F ,   F a u z M A ,   A d ik a r a   P P .   A n a li sis  S e n ti m e n   P a d a   Ula sa n   A p li k a si  M o b il e   M e n g g u n a k a n   Na iv e   B a y e Da n   No rm a li sa si  Ka t a   Be rb a sis   Lev e n sh tein   Dista n c e   (S tu d Ka su A p li k a si  BC A   M o b il e ) S y ste mic In fo rm a ti o n   S y ste m a n d   In f o rm a ti c s Jo u rn a l .   2 0 1 7   De s 3 1 3 (2 ): 1 - 6.   [5 ]     F a u z M A ,   Af iri a n to   T .   I m p ro v in g   S e n ti m e n A n a l y sis  o f   S h o rt  In f o rm a In d o n e sia n   P r o d u c Re v ie w u sin g   S y n o n y m   Ba se d   F e a tu re   Ex p a n s io n T E L KOM NIKA  ( T e lec o mm u n ica ti o n   Co mp u ti n g   El e c tro n ics   a n d   C o n tr o l) 2 0 1 8   J u n   1 ;1 6 (3 ) .   [6 ]     F a n issa   S ,   F a u z M A ,   A d in u g ro h o   S .   A n a li sis  S e n ti m e n   P a riw is a ta  d Ko ta  M a lan g   M e n g g u n a k a n   M e to d e   Na iv e   Ba y e d a n   S e le k si  F it u Qu e ry   Ex p a n sio n   Ra n k in g J u rn a Pen g e mb a n g a n   T e k n o l o g I n fo r ma si  d a n   Ilmu   Ko mp u ter . 2 0 1 8 ;   2 ( 8 ):2 7 6 6 - 7 0 .   [7 ]     Ro f iq o h   U,  P e r d a n a   RS ,   F a u z M A .   A n a li sis  S e n ti m e n   T in g k a K e p u a sa n   P e n g g u n a   P e n y e d ia  L a y a n a n   T e le k o m u n ik a si  S e lu ler  I n d o n e si a   P a d a   T w it ter  De n g a n   M e to d e   S u p p o rt  V e c to M a c h in e   d a n   L e x ico n   Ba se d   F e a tu re s J u rn a l   Pen g e mb a n g a n   T e k n o l o g i   In f o rm a si  d a n   Ilmu   Ko mp u ter .   2 0 1 7 1 (1 2 ): 1 7 2 5 - 32.   [8 ]     Jo a c h im T .   T e x c a te g o riza ti o n   w it h   su p p o rt  v e c to m a c h in e s:  L e a rn in g   w it h   m a n y   re l e v a n t   f e a tu re s In   Eu ro p e a n   c o n fer e n c e   o n   ma c h in e   lea rn i n g   1 9 9 8   A p 2 1   ( p p .   1 3 7 - 1 4 2 ).   S p ri n g e r,   Be rli n ,   He id e lb e rg .   1 2 3 4 5 KNN 6 5 . 5 1 7 5 . 2 1 7 0 . 8 3 6 2 . 5 1 6 2 . 1 5 N W - K N N 6 5 . 5 1 7 5 . 2 5 7 0 . 6 7 0 . 9 5 6 7 . 0 2 0 20 40 60 80 F - M e a su r e   K N e a r e st   N e i g h b o r s   K NN  v NW - K NN   Com p ar is on   KNN N W - K N N Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l 1 2 ,   No .   1 Octo b er   201 8     1 5 5     160   160   [9 ]     Nu rjan a h   W E,   P e rd a n a   RS ,   F a u z M A .   A n a li sis   S e n ti m e n   Terh a d a p   T a y a n g a n   T e le v isi  Be r d a sa rk a n   Op in M a s y a ra k a p a d a   M e d ia  S o sia l   Tw it ter  m e n g g u n a k a n   M e to d e   K - Ne a re st  Ne ig h b o d a n   P e m b o b o tan   Ju m lah   Re twe e t J u rn a Pen g e mb a n g a n   T e k n o lo g I n fo rm a si d a n   Ilmu   K o mp u ter .   2 0 1 7 1   ( 1 2 ),   1 7 5 0 - 5 7 .   [1 0 ]     S u h a r n o   CF ,   F a u z M A ,   P e rd a n a   RS .   Kla si f i k a si  T e k s   Ba h a sa   In d o n e sia   P a d a   Do k u m e n   P e n g a d u a n   S a m b a On li n e   M e n g g u n a k a n   M e to d e   K - Ne a re st  Ne ig h b o rs  d a n   Ch i - S q u a re S y ste mic In fo rm a ti o n   S y ste a n d   In fo rm a t ics   J o u rn a l .   2 0 1 7   De c   7 ; 3 (1 ): 2 5 - 32.   [1 1 ]     M e n tari  ND ,   F a u z M A ,   M u f li k h a h   L .   A n a li sis  S e n ti m e n   Ku rik u lu m   2 0 1 3   P a d a   S o sia M e d ia  Tw it ter   M e n g g u n a k a n   M e to d e   K - Ne a re st  Ne i g h b o d a n   F e a t u re   S e lec ti o n   Q u e ry   Ex p a n sio n   Ra n k in g J u rn a l   Pen g e mb a n g a n   T e k n o lo g In fo rm a si d a n   I lmu   K o mp u ter .   2 0 1 8 2   ( 8 ):2 7 3 9 - 4 3 .   [1 2 ]     Clau d y   YI,   P e rd a n a   RS ,   F a u z M A .   Kla si f ik a si  Do k u m e n   Tw it ter  Un tu k   M e n g e tah u Ka ra k ter  Ca lo n   Ka r y a w a n   M e n g g u n a k a n   A lg o rit m e   K - Ne a re st  Ne ig h b o (KN N) J u rn a Pen g e mb a n g a n   T e k n o lo g I n fo r ma si  d a n   I lm u   Ko mp u ter .   2 0 1 8 2 ( 8 ): 2 7 6 1 - 65.   [1 3 ]     M u n ir   M M ,   F a u z M A ,   P e rd a n a   RS .   Im p le m e n tas M e to d e   Ba c k p ro p a g a ti o n   Ne u ra Ne tw o rk   b e rb a sis  L e x ico n   Ba se d   F e a tu re d a n   Ba g   o f   W o rd Un t u k   Id e n ti f i k a si  Uja ra n   Ke b e n c ian   P a d a   T w it ter J u rn a P e n g e mb a n g a n   T e k n o lo g I n fo rm a si d a n   Ilmu   K o mp u ter   e - IS S N.  2 0 1 7 ;2 5 4 8 :9 6 4 X .   [1 4 ]     L a m   S L ,   Lee   D L .   F e a tu re   re d u c ti o n   f o n e u ra n e tw o rk   b a se d   tex c a teg o riza ti o n In Da t a b a se   S y ste ms   fo Ad v a n c e d   Ap p li c a t io n s,  1 9 9 9 .   Pro c e e d in g s. ,   6 t h   I n ter n a ti o n a l   Co n fer e n c e   o n   1 9 9 9   ( p p .   1 9 5 - 2 0 2 ).   IE EE .   [1 5 ]     S u n   Y,  W o n g   A K,  K a m e l   M S .   Clas si f ica ti o n   o f   i m b a lan c e d   d a ta:  re v ie w In ter n a ti o n a J o u rn a o P a tt e r n   Rec o g n it io n   a n d   Arti fi c i a In telli g e n c e .   2 0 0 9   J u n ; 2 3 ( 0 4 ) :6 8 7 - 7 1 9 .   [1 6 ]     F ra n k   E,   Bo u c k a e rt  RR.   Na i v e   b a y e f o te x c l a ss i f ica ti o n   w it h   u n b a la n c e d   c las se s In Eu ro p e a n   Co n fer e n c e   o n   Prin c ip les   o Da t a   M in i n g   a n d   K n o wled g e   Disc o v e ry   2 0 0 6   S e p   1 8   (p p .   5 0 3 - 5 1 0 ).   S p ri n g e r,   Be rli n ,   He id e lb e rg .   [1 7 ]     L iu   Y,  L o h   HT ,   S u n   A .   I m b a lan c e d   tex c las sif ic a ti o n A   term   w e i g h ti n g   a p p r o a c h Exp e r sy ste ms   wit h   Ap p li c a ti o n s .   2 0 0 9   Ja n   1 ; 3 6 (1 ): 6 9 0 - 7 0 1 .   [1 8 ]     Ch a w la  NV ,   Ja p k o w icz   N,  Ko t c z   A .   S p e c ial  issu e   o n   lea rn i n g   f ro m   i m b a lan c e d   d a ta  se ts ACM   S i g k d d   Exp lo ra ti o n s Ne wsle tt e r .   2 0 0 4   Ju n   1 ; 6 (1 ) :1 - 6.   [1 9 ]     T a n   S .   Ne ig h b o r - w e ig h ted   k - n e a re st  n e ig h b o f o u n b a la n c e d   te x c o rp u s Exp e rt  S y ste ms   wit h   Ap p li c a ti o n s 2 0 0 5   M a y   1 ;2 8 (4 ): 6 6 7 - 7 1 .   [2 0 ]     Ro si  F ,   F a u z M A ,   P e rd a n a   RS .   P re d ik si  Ra ti n g   P a d a   Re v ie w   P ro d u k   Ke c a n ti k a n   M e n g g u n a k a n   M e to d e   Na ïv e   Ba y e s   d a n   Ca teg o rica l   P ro p o r t i o n a Diff e re n c e   (CP D) J u rn a l   Pen g e mb a n g a n   T e k n o l o g In fo r ma si  d a n   Ilm u   Ko mp u ter .   2 0 1 8 2 ( 5 ): 1 9 9 1 - 97.   [2 1 ]     L e sta ri  A R,   P e rd a n a   RS ,   F a u z M A .   A n a li sis  S e n ti m e n   T e n tan g   Op in i   P il k a d a   Dk 2 0 1 7   P a d a   D o k u m e n   Tw it ter  Be rb a h a sa   In d o n e sia   M e n g g u n a k a n   iv e   Ba y e d a n   P e m b o b o tan   Em o ji J u rn a Pen g e mb a n g a n   T e k n o lo g i   In fo rm a si   d a n   Ilm u   K o mp u ter .   2 0 1 7 1 (1 2 ): 1 7 1 8 - 24.   [2 2 ]     F a u z M A ,   A ri f in   A ,   Yu n iarti  A .   T e r m   Weig h ti n g   Be rb a sis  In d e k Bu k u   d a n   Ke las   u n tu k   P e ra n g k in g a n   Do k u m e n   Be rb a h a sa   A r a b L o n ta r K o mp u t e r: Ju rn a Ilmi a h   T e k n o l o g In fo r ma si .   2 0 1 3 .   [2 3 ]     T a la F Z.   A   stu d y   o f   ste m m in g   e ff e c ts  o n   in f o rm a ti o n   re tri e v a in   Ba h a sa   In d o n e sia In stit u te f o r L o g ic,  L a n g u a g e   a n d   Co m p u t a ti o n ,   Un ive rs it e it   v a n   Amste rd a m ,   T h e   Ne th e rlan d s.  2 0 0 3   Ju l.   [2 4 ]     P ra m u k a n to ro   ES ,   F a u z M A .   C o m p a ra ti v e   a n a l y sis   o strin g   si m il a rit y   a n d   c o rp u s - b a se d   sim il a rit y   f o a u to m a ti c   e ss a y   sc o rin g   s y ste m   o n   e - lea r n in g   g a m i f ica ti o n In Ad v a n c e d   Co mp u ter   S c ien c e   a n d   In fo rm a ti o n   S y ste ms   ( ICACS IS ),   2 0 1 6   In ter n a ti o n a C o n fer e n c e   o n   2 0 1 6   Oc 1 5   ( p p .   1 4 9 - 1 5 5 ).   IEE E.   [2 5 ]     F a u z M A ,   Yu n iarti  A .   En se m b le  M e th o d   f o In d o n e sia n   T w it ter  Ha te  S p e e c h   De tec ti o n In d o n e sia n   J o u rn a o f   El e c trica En g in e e rin g   a n d   Co m p u ter   S c ien c e   ( IJ EE CS ) .   2 0 1 8   Ju l   1 ;1 1 (1 ).   [2 6 ]     F a u z M A ,   Uto m o   DC,  S e ti a wa n   BD,  P ra m u k a n to ro   ES .   A u to m a ti c   Essa y   S c o rin g   S y ste m   Us i n g   N - G r a m   a n d   Co sin e   S im il a rit y   f o G a m i f i c a ti o n   Ba se d   E - L e a rn in g In Pr o c e e d in g o t h e   In ter n a ti o n a Co n fer e n c e   o n   Ad v a n c e s i n   Ima g e   Pro c e ss in g   2 0 1 7   A u g   2 5   (p p .   1 5 1 - 1 5 5 ).   A CM .   [2 7 ]     F a u z M A ,   A ri f in   A Z,   Yu n iarti  A .   Ara b ic  Bo o k   Re tri e v a u sin g   Clas a n d   Bo o k   In d e x   Ba se d   T e rm   Weig h ti n g In ter n a t io n a J o u rn a o E lec trica a n d   C o mp u ter   En g in e e rin g   ( IJ ECE ) .   2 0 1 7   De c   1 ; 7 (6 ): 3 7 0 5 - 1 0 .   Evaluation Warning : The document was created with Spire.PDF for Python.