I AE S  I nte rna t io na l J o urna l o f   Art if icia l In t ellig ence   ( I J - AI )   Vo l.   7 ,   No .   3 ,  Sep tem b er   201 8 ,   p p .   11 9 ~ 124   I SS N:  2252 - 8938 ,  DOI : 1 0 . 1 1 5 9 1 /i j ai. v 7 . i3 . p p 11 9 - 1 2 4           119       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 / I JA I   Ana ly sing  Ev ent - Rela ted  S enti m e n ts on So cia l Medi a   w ith  Neura l Ne tw o rk s       P .   Sa nthi P riy a 1 ,   T .   Venk a t e  s w a ra   Ra o 2   1 De p a rtme n t  o f   Co m p u ter S c ien c e   a n d   E n g in e e rin g ,   S ri   S a iram   Co ll e g e   o f   En g in e e rin g ,   Be n g u lu r u ,   In d ia   2 Co m p u ter S c ien c e   a n d   E n g in e e ri n g ,   P VP   S id d h a rth a   En g in e e rin g   Co ll e g e ,   In d ia       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Ma r   1 1 ,   2 0 1 8   R ev i s ed     Ma y   10 ,   2 0 1 8   A cc ep ted   J u n   20 ,   2 0 1 8       S e n ti m e n t  a n a l y sis  is  p e rf o r m e d   to   d e term in e   th e   p o lari ty   o f   o p in io n   o n   a   su b jec t.   It  h a s  b e e n   a p p li e d   to   te x t  c o rp o ra   su c h   a s  m o v ie  re v ie ws ,   f in a n c ial   d o c u m e n ts  to   g lea n   in f o r m a ti o n   a b o u t  o v e ra ll - se n ti m e n t  a n c   p ro d u c e   a c ti o n a b le  d a ta.  Re c e n t  e v e n ts   h a v e   d e m o n stra ted   th a t  p o ll i n g   c a n   b e   so m e ti m e s  u n re li a b le.  P e o p le  c a n   b e   d iff icu lt   to   a c c e s s  th ro u g h   c o n v e n ti o n a l   p o ll i n g   m e th o d s a n d   les s th a n   f ra n k   in   p o ll s.  I n   th e   e ra   o f   so c ial  m e d ia,  v o ters   a re   li k e l y   to   m o re   f re e l y   e x p re s s  th e ir  o p in i o n   o n   so c ial  m e d ia  f o ru m s  a b o u t   d iv isiv e   e v e n ts  e sp e c iall y   in   m e d ia  w h e re   a n o n y m it y   e x ists.  A n a l y z in g   th e   p re v a il in g   o p i n io n   o n   t h e se   f o ru m s  c a n   in d ica te  if   th e re   a re   a n y   d e f icie n c ies   in   p o ll in g   a n d   c a n   b e   a   v a lu a b le  a d d it i o n   t o   c o n v e n t io n a l  p o ll in g .   W e   a n a ly z e d   tex t  c o rp o ra   f ro m   Re d d it   f o ru m s  d isc u ss in g   th e   re c e n t  re fe re n d u m   in   Brit a in   to   e x it   f ro m   th e   EU  ( k n o w n   a s  Br e x it ).   Bre x it   wa s  a n   im p o rtan t  w o rld   e v e n t  a n d   w a s  v e r y   d iv isiv e   in   th e   r u n - u p   a n d   p o st  v o te.  W e   a n a l y z e d   se n ti m e n t  in   t w o   w a y s:  In it iall y   w e   tri e d   to   g a u g e   p o sit iv e ,   n e g a ti v e ,   a n d   n e u tral  se n t im e n ts.  In   t h e   se c o n d   a n a ly sis,  w e   f u rth e r  sp li t  t h e se   se n ti m e n ts   in to   six   d if f e re n t  p o lariti e s  b a se d   o n   t h e   d irec ti o n a li ty   o f   th e   p o siti v e   a n d   n e g a ti v e   se n ti m e n ts  (f o r  o r  a g a in s t  Bre x it ).   Ou r   tec h n iq u e   u t li li z e d   p a ra g ra p h   ve c to rs  (Do c 2 V e c )  t o   c o n stru c t  f e a tu re   v e c to rs  f o r  se n ti m e n t  a n a l y sis  w it h   a   M u lt il a y e r  P e rc e p tro n   c las sif ier.  W e   f o u n d   t h a t  th e   se c o n d   a n a ly s is  y ield e d   o v e ra ll   b e tt e r  re su lt s;  a lt h o u g h ,   o u r  c las sif ier   d id n ’t  p e rf o rm   a s  w e ll   in   c las si fy in g   p o siti v e   se n ti m e n t s.  W e   d e m o n stra te  th a t  i t  is   p o ss ib le  g lea n   v a lu a b le  in f o r m a ti o n   f ro m   c o m p li c a ted   a n d   d iv e rse   c o rp o ra   su c h   a s  m u lt i - p a ra g ra p h   c o m m e n ts  f ro m   re d d it   w it h   se n ti m e n t  a n a l y sis.   K ey w o r d :   Do c2 Vec   E U  r ef er en d u m   Mu lti - la y er   p er ce p tr o n s   Neu r al  n et w o r k s   P ar ag r ap h   v ec to r s   Sen ti m e n t a n a l y s is   Co p y rig h t  ©   2 0 1 8   In stit u te o f  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 l  rig h ts re se rv e d .   C o r r e s p o nd ing   A uth o r :   P .   San th i P r i y a,     Dep ar t m en t o f   C o m p u ter   Scie n ce   an d   E n g i n ee r in g ,     Sri  Sair a m   C o lleg e  o f   E n g in ee r in g ,   B en g u lu r u ,   I n d ia .   E m ail:  s h a n tip r i y a. p @ g m ail. c o m       1.   I NT RO D UCT I O N   Sen ti m e n t  a n al y s i s   i s   a  q u a n tit ativ e  a u to m ated   o p in io n   m i n i n g   tech n iq u e  w h ich   atte m p ts   t o   q u an ti f y   th e  s en t i m e n t   ( p o s itiv e /n e g ati v e/n e u tr al)   a ttach ed   to   te x t  co n ten t.  Ma c h in e   lear n in g   ap p r o ac h es  [ 1 ]   lo o k   f o r   w o r d s   o r   p h r ases   th at  d en o te  t h e  s e n ti m en t  p o lar it y   o f   th e  te x t.  A   tr ain i n g   s et  o f   ex a m p le s   is   u s ed   to   ass i g n   a  p o lar ity   a n d   w eig h t  to   w o r d s   w h ic h   ca n   la ter   b e  u s ed   to   p r ed ict  th e  s e n ti m e n t  o f   a  w id er   s et  n o t  i n cl u d ed   in   th e  tr ai n i n g   s et.   T r ain in g   ca n   b e  s u p er v is ed   b y   ex p lic it  lab ellin g   o f   p o lar it y   m an u all y   o r   b y   i m p licit y   d eter m in i n g   p o lar it y   f r o m   f ea t u r es  s u c h   as  e m o j is .   Sen ti m e n t  an al y s i s   an d   p r ed ictio n   h av e   b ee n   e m p lo y ed   i n   v ar io u s   d o m ai n s   s u cc ess f u ll y .   Sen t i m e n t   p r ed ictio n   h a s   b ee n   u s ed   to   g e n er ate  s to c k   r ec o m m en d atio n s   b ased   o n   r ea ctio n s   to   n e w s   an d   b lo g s   [ 5 ] ,   ass i g n   e m o tio n al   p o lar ity   to   n e w s   ar ticle s   [ 6 ]   an d   p r e d ict  th e   r ea ctio n   o f   s p ec if ic  a u d ien ce s /co m m u n i ti es to   n e w s   [ 1 1 ] .     Ma r k ets  all  o v er   th e  w o r ld   r es p o n d   to   m aj o r   ev en t s   n o t  o n l y   p o s t  th e  ev e n t  b u t  a ls o   in   th e  r u n - u p   to   ev en t s .   P r ices  i n   s to ck   m ar k et s ,   r ea l - e s tate  m ar k et s   a n d   cu r r en c y   m ar k ets   all  f l u ct u ate  ac c o r d in g   to   p er ce iv ed   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8938   IJ - AI    Vo l.  7 ,   No .   3 ,  Sep tem b e r   20 1 8   :   11 9   –   12 4   120   o u tco m e  o f   ev e n t s .   T h e  ab ilit y   to   p r ed ict  h o w   t h ese   ev e n ts   w ill  p an   o u t  b y   g a u g i n g   s e n t i m e n t  w o u ld   b e  an   i m m en s el y   u s e f u l  to o l  f o r   t ak in g   p r o f itab le  p o s itio n s   in   th ese  m ar k e ts .   P o lls   d o n ’ t  al w a y s   r ef lect  th e   s en ti m e n t  ac c u r atel y   s i n ce   p e o p le  ca n   b e  d if f icu lt   to   ac ce s s   o r   less   t h a n   f r a n k   in   p o ll s   [ 7 ] ;  th er ef o r e,   it  is   w o r th w h i le  i n v e s ti g ati n g   if   s o cial  m ed ia  a n d   esp ec iall y ,   a n o n y m o u s   s o cial  m ed ia  ca n   b e  a   g o o d   p r ed icto r   o f   s en ti m e n t.  A n o n y m i t y   a f f o r d s   a  d eg r ee   o f   p r o tectio n   to   th e  co m m e n ter   s o   th at  t h e y   ca n   ex p r ess   th e ir   o p in io n   m o r e   f r ee l y .   T h is   is   e s p ec iall y   r elev a n t  w h e n   t h e  e v en t   is   h i g h l y   d i v i s iv e   an d   a   h i g h   s o cial  co s t  i s   attac h ed   to   ex p r ess i n g   o n e’ s   o p in io n   f r an k l y .     R ed d it  is   an   en ter tain m e n t,  n e w s   a n d   g e n er al  p u r p o s e  s o cial   n et w o r k in g   s ite   w h er e   m e m b er s   o f   th e   co m m u n it y   s u b m it  eit h er   d ir ec t  li n k   to   w eb s ites   o r   te x t  p o s ts .   R ed d it  i s   o r g a n is ed   b y   to p ics  o f   in ter e s t  i n to   s u b - co m m u n it ies  ca lled   s u b r ed d its . T h e  m e m b er s   p o s ti n g   in   a  s u b - r ed d it  ar e  o n l y   i d en tifie d   b y   th e ir   u s er n a m e s   th er e f o r e  af f o r d in g   a  d eg r ee   o f   an o n y m it y   o n   R ed d it.  Oth er   m e m b er s   o f   t h e  co m m u n it y   ca n   co m m e n t  o n   t h ese  p o s t s .   T h ese  co m m en t s   ar e  th e n   u p - v o ted   o r   d o w n - v o ted   r ef lect in g   th e  v ie w s   o r   t h e   s en ti m e n ts   o f   t h e  m e m b er s   o f   th e  co m m u n it y .   T h e  co m m e n t  v o tes  ca n   b e  u s ed   to   m ea s u r e  th e  s e n ti m en t  in   th at  p ar ticu lar   s u b - co m m u n it y   w h ic h   m a y   d i f f er   f r o m   s en t i m en ts   i n   o th er   s u b r ed d its .   R e d d it  co m m e n ts   ca n   b e  m u lti - p ar ag r ap h   a n d   ca n   a ls o   co n tai n   l in k s ,   e m o j is   a n d   i m a g es.  T h e  co m p lex   n at u r e  o f   t h ese  co m m en ts   co n tain i n g   d if f er en t  m ed ia,   r h eto r ical  f lo u r is h es a n d   s ar ca s m   ca n   b e  ch al len g i n g   f o r   s en ti m en t a n al y s is .   I n   t h is   p ap er ,   w e  p er f o r m ed   f i n e - g r ai n ed   s e n ti m e n t  a n al y s i s   to   d eter m in e  if   w e  co u ld   class i f y   s en ti m e n t  r elate d   to   a  p ar ticu l ar   ev en t.  W e  tr ied   to   d eter m i n e  if   co m m e n ter s   v ie w ed   a  ce r tain   ev e n t  p o s iti v el y   o r   n eg ati v el y   a n d   s a m p led   f r o m   m u lt ip le  s u b - r ed d its .   Fo r   th e  ev e n t,  w e  ch o s e  t h e  r ef er e n d u m   co n d u cted   i n   B r itain   as  to   w h et h er   B r itain   s h o u ld   leav e  t h e  E u r o p ea n   u n io n   ( k n o w n   as  B r ex it)  as   th is   w a s   a  m aj o r   h is to r ical  ev e n t  w it h   a m p le  d i s cu s s io n   b e f o r e  an d   af ter   th e  ev en t.  T h is   a f f o r d ed   u s   th e  p o s s ib ilit y   to   co llect   an d   an al y ze   lar g e  a m o u n ts   o f   d ata       2.   DATAS E T   I n   th i s   p ap er ,   w e  ex tr ac ted   c o m m e n t s   f r o m   p o s ts   i n   t w o   s p ec if ic  s u b r ed d its   co n ce n tr at ed   o n   th e  Un ited   K in g o m -   r / u n ited k in g d o m   an d   r / u k p o liti c s .   T h ese  t w o   s u b r ed d its   h a v e  a  lar g e  n u m b er   o f   s u b s cr ib er s -   1 3 4 , 9 1 7   an d   5 6 , 4 9 3   r esp ec tiv el y .   W e  f ir s t  f il ter ed   p o s ts   t h at  h ad   t h e  k e y w o r d s   ”b r ex it”  o r   ”r ef er en d u m ”  i n   th e  titl e.   P o s ts   w it h   ti m e s ta m p s   r an g i n g   f r o m   J u n e  1 ,   2 0 1 6 - J u l y   3 1 ,   2 0 1 6   w er e  in cl u d ed   in   th e  s t u d y .   T h is   ti m e  p er io d   co v er ed   th e  p r e   an d   p o s t  r ef er en d u m   ( co n d u cted   o n   J u n e  2 3 ,   2 0 1 6 )   p e r io d .   A ll  p o s ts   an d   co m m e n t s   w er e  ex tr ac ted   u s in g   th e  R ed d it A P I   p latf o r m   i m p le m e n ted   in   P y t h o n   2 . 7 .   1 2 4 , 7 8 8   co m m en t s   w er e  ex tr ac ted   to tall y   f r o m   t h e  p o s t s   ac r o s s   all   ep o ch   o f   t h e  t w o   s u b r ed d its .   W e   p ick ed   a  s u b s et  o f   ap p r o x i m at el y   3 0 %  o f   t h e  co m m e n t s   f o r   th e  tr ai n in g   a n d   test   s et  ( 2 4 , 4 2 3   co m m en ts ) .   W e  d iv id ed   th e  co m m e n t s   in to   f i v e  r o u g h l y   7 - 1 5   d ay   ep o ch s :  1 - 1 7   J u n e,   1 7 - 2 3   J u n e,   2 4   J u n e - 1   J u l y ,   1 - 1 6   J u ly   an d   1 6 - 3 1   J u l y .   T h e  co m m en t s   w er e  s e lecte d   r an d o m l y   f r o m   ea c h   ep o ch   in   p r o p o r tio n   to   th e  to tal  n u m b er   o f   co m m e n t s   u s in g   s tr ati f ied   r an d o m   s a m p li n g .   T h is   w a s   d o n e  to   en s u r e  t h at  w e  d id n ’ t  ac cid en tl y   o v er l y   s a m p l e   f r o m   a  ce r tai n   ti m e  p er io d .   W e  also   s elec ted   p o s ts   f r o m   o t h er   s u b r ed d its   s u ch   a s   r / w o r ld n e w s   a n d   r /p o liti cs   th at  h ad   ”B r ex it”  o r   ”E U  r ef er en d u m ”  p o s ted   w it h in   t h e  ti m esp an   u n d er   co n s id er atio n   ( 1 5 4 5   co m m e n ts )   T h e     co m m e n t s   f r o m   t h ese  p o s ts   wer e  ex tr ac ted   an d   ad d e d   to   th e  s u b s et.   T h ese  co m m e n t s   w er e  th en   an n o tated   b y   t w o   h u m a n   an n o tater s .   W e  o n l y   k ep t t h o s e  an n o tatio n s   o n   wh ich   b o th   t h e  a n n o tater s   a g r ee d .   T h e  d ata  w as  p r ep r o ce s s ed   b y   r e m o v i n g   ex tr a  w h ites p ac e s ,   r em o v i n g   all  p u n ct u atio n   a n d   all  tex t   w a s   co n v er ted   to   lo w er   ca s e.     W e  th en   p er f o r m ed   an al y s is   o n   t w o   le v els.  T h e  tr ain in g   s et  w a s   an n o tated   o n   o n e  lev el  as   p o s itiv e,   n eg at iv e  a n d   n eu tr al.   T h ese  p o lar ities   w er e  t h en   f u r t h er   s p l it  in to   s i x   d if f er en t  s e n ti m e n t  p o lar ities :  p o s itiv e   to w ar d s   leav i n g   th e  E U  ( P L ) ,   p o s itiv e  to w ar d s   r e m ai n i n g   i n   th e  E U  ( P R ) ,   n eg ativ e  to w a r d s   leav in g   th e  E U  ( NR ) ,   n eg at iv e   to w ar d s   s ta y i n g   in   t h e  E U  ( N L ) ,   n eg at iv e  to w ar d s   r e m a in   s u p p o r ter s   ( NL R )   an d   n e u tr al.   Af ter   r e m o v i n g   b lan k   p ar ag r a p h s   a n d   s o   o n ,   w e  e n d ed   u p   w it h   2 0 7 5 0   co m m e n t s   i n   t h e  t r ain in g   s et   an d   5 1 8 7   co m m e n t s   i n   th e  t est  s et  f o r   th e  f ir s t  an al y s is   af ter   a  8 0 :2 0   s p l it  o f   t h e  o r ig in a l  s et  a n d   2 0 7 7 4   co m m e n t s   i n   t h e  tr ai n i n g   s et  an d   5 1 6 2   co m m en ts   i n   test   s et  f o r   t h e  s ec o n d   an al y s is .   T h e  d if f er e n ce   i n   t h e   n u m b er   o f   co m m e n ts   i s   d u e  t o   th e  f ac t  t h at  t h e  an al y s is   w a s   r u n   s ep ar atel y   o n   t h e  t w o   s e ts   b ec au s e  t h e  p ick s   w er e  r an d o m ized   a n d   th e  r atio   s p lits   v ar ied   s li g h tl y .       3.   AL G O RI T H M   Ma ch i n e  lear n in g   al g o r it h m s   f o r   ap p licatio n s   li k e  s e n ti m e n t  an al y s is   r eq u ir e  te x t  to   b e  tr an s f o r m ed   in to   a  f ix ed - le n g th   v ec to r   s u itab le  f o r   p r o ce s s in g .   T h e  co m m o n   b ag - of - w o r d s   ( B o W )   ap p r o ac h   w h ic h   r ep r esen ts   te x t/d o cu m e n ts   in   t er m s   o f   a  v ec to r   o f   w o r d /to k en   f r eq u en c y   h as  s o m e  d r a w b ac k s - w o r d   o r d er   is   lo s t  an d   s o m e   o f   th e   s e m a n tic s   as s o ciate d   w it h   t h e  w o r d   i n   tex t  i s   al s o   lo s t.  Vec to r   r ep r esen tatio n s   o f   w o r d s   Evaluation Warning : The document was created with Spire.PDF for Python.
IJ - AI     I SS N:  2252 - 8938       A n a lysi n g   E ve n t - R el a ted   S e n timen ts   o n   S o cia l Med i a   w ith   N eu r a l Netw o r k s   ( P .   S a n th i P r iya )   121   h av e  atte m p ted   to   r em ed y   s o m e  o f   th e s e  d r a w b ac k s .   I n   W o r d 2 Vec ,   v ec to r   r e p r esen tatio n s   ar e  co m p u ted   f o r   ea ch   w o r d .   I ts   in p u t is a  te x t c o r p u s   an d   its   o u tp u t is a  s et  o f   f ea t u r e  v ec to r s   f o r   w o r d s   i n   t h at  co r p u s .   W o r d 2 v ec   is   a  t w o - la y er   n eu r al  n et  th at  p r o ce s s es  tex t.  I ts   i n p u t  is   a  tex t  co r p u s   an d   i ts   o u tp u t  is   a   s et  o f   v ec to r s : f ea t u r e  v ec to r s   f o r   w o r d s   in   th at  co r p u s .   I n   W o r d 2 Vec ,   a  d is tr ib u ted   r ep r ese n tatio n   o f   a  w o r d   i s   u s ed .   Giv e n   a  f ea tu r e  v ec to r   w it h   s e v er al  h u n d r ed   d im e n s i o n s ,   ea ch   w o r d   is   r ep r esen ted   b y   a  d is tr ib u tio n   o f   w ei g h ts   ac r o s s   th o s e   ele m en t s   a n d   ea ch   ele m en t   i n   t h e  v e cto r   co n tr ib u tes   to   t h e  d e f in it io n   o f   m an y   w o r d s .   T h e  n eu r al   n et w o r k   b ased   wo r d   v ec to r s   ar e  u s u all y   tr ai n ed   u s i n g   s to ch as tic  g r ad ien t   d escen t  w h er e  t h e  g r ad ien t is o b tai n ed   v ia  b ac k   p r o p ag atio n .   A   m o r e  r ef i n ed   ap p r o ac h   i n v o lv e s   p ar ag r ap h   v ec to r s   w h ich   w o r k   a t  th e   lev e l  o f   s e n ten ce s   o r   d o cu m en ts .   T r ain in g   w o r d   v ec to r s   o cc u r s   as  n o r m al,   e x ce p t  th at  a n   ad d itio n al  v ec t o r   r ep r esen tin g   th e   p ar ag r ap h   is   ad d ed   to   th e  task   w h e n ev er   t h e  s a m p led   w i n d o w   co m e s   f r o m   th a t p ar ag r ap h .   I n   th e  P ar ag r ap h   Vec to r ( Do c2 Vec )   [ 9 ]   f r am e wo r k ,   ev er y   p ar ag r ap h   is   m ap p ed   to   a  u n iq u e  v ec to r   an d   ev e r y   w o r d   is   also   m ap p ed   to   a  u n iq u e  v ec t o r   lik e  i n   W o r d 2 Vec .   B o th   th e  p ar ag r ap h   v ec to r s   an d   w o r d   v ec to r s   ar e  tr ain ed   u s i n g   s to ch a s tic  g r ad ien t  d es ce n t  an d   t h e  g r ad ien t  is   o b tain ed   v ia  b ac k p r o p ag atio n .   T h e  o b tain ed   f ea tu r e   v ec to r s   ca n   b e  u s ed   a s   i n p u t s   to   co n v e n tio n al   m ac h i n e  lear n in g   alg o r it h m s   s u c h   a s   clas s i f i er s ,   etc.   P ar ag r ap h   v ec to r s   i n h er it  a n   i m p o r tan t  p r o p er ty   o f   th e  w o r d   v ec to r s :  th e  s e m a n tic s   o f   t h e  w o r d s . i.e . it   g r o u p s   t h e  v ec to r s   o f   s i m ilar   w o r d s   to g et h er   in   v ec to r s p ac e.   T h e  s ec o n d   ad v an t ag e  o f   th e  p ar ag r ap h   v ec to r s   is   th at  t h e y   ta k e  in to   co n s id er atio n   t h e  w o r d   o r d er   an d   r etain   s o m e  i n f o r m atio n   a b o u t  th e   co n te x t.  W e  co n s id er ed   th is   ap p r o ac h   to   co n s tr u ct i n g   f ea t u r e  v ec to r s   m o s t  s u i tab le  f o r   o u r   a n al y s i s   an d   tr an s f o r m ed   o u r   co r p u s   in to   f ea tu r e  v ec to r s   u s i n g   t h e  g e n s i m   i m p le m e n ta tio n   o f   t h e  Do c2 Vec   al g o r ith m   [ 4 ] .   Af ter   tr an s f o r m atio n ,   ea ch   co m m e n t   w as   r ep r esen ted   b y   a  f ix ed - le n g th   f ea tu r e  v ec to r   w it h   a  d i m e n s io n alit y   o f   1 0 0 .       4.   M E T H O D   T h e  f ea tu r e  v ec to r s   o b tain ed   f r o m   t h e  Do c2 Vec   p r o ce s s   wer e  s tan d ar d ized   b y   r e m o v i n g   th e  m ea n   an d   s ca li n g   to   u n i t v ar ia n ce .   A  Mu lti  L a y er   P er ce p tr o n   C las s if ier   ( ML P )   [ 1 0 ]   w a s   th e n   tr ai n ed   o n   th e s e  s ca led   an d   ce n ter ed   f ea t u r e  v ec to r s   o f   th e  tr ai n i n g   s et.   W e  f o u n d   th e  b est  p ar am eter s   t h r o u g h   a  g r id s ea r ch   alg o r it h m   w h ic h   p er f o r m s   e x h a u s tiv e   s e ar ch es  o v er   s p ec if ied   p ar a m et er s .   A  k - f o ld   ( 5 - f o ld )   cr o s s   v alid atio n   ap p r o ac h   w a s   u s ed   to   tu n e  t h e  clas s i f ier   an d   p ick   p ar a m eter s   w h ic h   y ie ld ed   th e  b est ac cu r ac y .   W e  th en   r a n   a n   ev a lu atio n   ( te s t)   s et  t h r o u g h   th e   o p ti m ized   class i f ier   to   e v alu a te  th e   p er f o r m an ce   o f   th e  class i f ier   o n   h i th er to   u n s e en   d ata.   W e  test ed   d if f er en t  a lg o r ith m s   a n d   ac tiv atio n   f u n c tio n s   f o r   th e  M L P   class i f ier ,   f o r   ex a m p le,   L - B F GS,  A d a m   an d   Sto ch a s tic  g r a d ien t d esce n t ( SG D) .   Fo r   t h e  f ir s t c ase   o f   a s s i g n in g   th r ee   s e n ti m e n t  p o lar ities ,   w e   o b tain ed   th e  b e s t  r es u lt s   w it h   th e  L - B FGS   alg o r it h m   [ 2 ]   an d   a  r ec tif ied   li n ea r   u n i t  ac tiv atio n   f u n c tio n .   Fo r   th e  s ec o n d   ca s e,   w e  o b tain ed   th e  b e s t  r esu lt s   w ith   t h e  A d a m   a lg o r it h m   a n d   a  h y p er b o lic  tan   ac ti v atio n   f u n c t io n   [ 8 ] .   Up o n   an n o tatio n   in to   t h e  d if f er en t  p o lar ities ,   w e  d is co v er e d   th at  o u r   d ataset  h ad   m o r e  ex a m p le s   o f   n eg at iv e  a n d   n e u tr al  s en ti m en ts   th a n   p o s iti v e  s en ti m en t s .   Fo r   th e  f ir s t  a n al y s i s   t y p e,   w e  o b tain ed   th e  tr ai n i n g   an d   test   s et   b y   p ic k i n g   p r o p o r tio n atel y   f r o m   d i f f er e n t  cla s s es  u s i n g   s tr ati f ied   s a m p l in g .   [ 1 0 ] .   I n   th e  s ec o n d   t y p e  o f   an al y s i s   w h er e  w e  w e r e  class if y i n g   th e  d ata  in to   s i x   d if f er en t  cla s s es,  t h e  NR   a n d   n eg ati v e  p o lar it y   w a s   u n d er s a m p led   to   7 0 %  o f   th e  clas s   in   o r d er   to   b alan ce   th e  tr ain i n g   s et  a n d   n o t  b ias  t h e  class i f ier   to w ar d s   n eg at iv e  a n d   n e u tr al  s e n ti m en t s .       5.   RE SU L T S   Fo r   o u r   f ir s t  a n al y s is ,   w e  at te m p ted   class if ica tio n   i n to   t h r e e  s en t i m e n t  p o lar ities :  p o s iti v e,   n eg at iv e  an d   n eu tr al.   W e  tu n ed   o u r   p ar a m eter s   b y   co n d u cti n g   a  g r id   s ea r ch   w ith i n   a  cr o s s - v alid atio n   lo o p   u s in g   t h e   n ested   cr o s s - v alid atio n   p ar ad ig m   [ 3 ] .   T h e  h y p er p ar a m eter s   w er e  tu n ed   i n   t h e  i n n er   cr o s s - v alid atio n   lo o p   ( s tr atif ied   K - f o ld   w it h   3   s p lits )   w h i le  th e  g e n er aliza tio n   er r o r   w as  m ea s u r ed   o v er   s ev er al  d ataset  s p lits   in   t h e   o u ter   cr o s s - v alid atio n   lo o p   ( s tr atif ied   K - f o ld   w ith   3   s p lit s ) .   T h e  p ar am eter s   th a t  w er e  v ar i ed   w er e  th e  n u m b er   o f   n e u r o n s   i n   t h e  h id d en   la y er   an d   th e   L 2 - r eg u lar izat io n   p ar a m eter   ( alp h a)   a n d   w e  u s ed   F1 -   w e ig h ted   s co r e  in   o r d er   to   ev alu ate  th e  p er f o r m an ce .   Ou r   h id d en   la y er   p ar a m eter s   w er e:  5 0 ,   1 0 0   o r   2 0 0   n eu r o n s   in   a  s i n g le   h id d en   la y er ;  an d   o u r   alp h a  p a r a m eter s   w er e:  0 . 0 0 0 1 ,   0 . 0 0 1 ,   0 . 0 1 ,   0 . 1 .   T h e  cr o s s   v alid atio n   p r o ce s s   y ield ed   a  m ea n   F1 - s co r e  o f   0 . 5 1 8   ( th is   co r r esp o n d ed   to   a  m ea n   clas s i f icatio n   ac cu r ac y   o f   6 0 %  e s ti m ated   i n   a  s ep ar ate  r u n   w i th   th e  s a m e  tr ain in g   s e t )   an d   a  co m b in at io n   o f   h id d e n   la y er   p ar a m eter   o f   5 0   n e u r o n s   a n d   an   a lp h a  o f   0 . 0 0 0 1   y ield ed   th e  b est  m ea n   F1 - s co r e  o f   0 . 5 2 7   as sh o w n   i n   Fig u r e  1 .         Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8938   IJ - AI    Vo l.  7 ,   No .   3 ,  Sep tem b e r   20 1 8   :   11 9   –   12 4   122       Fig u r e  1 .   R esu lts   o f   Gr id - Sear ch   A l g o r ith m   f o r   A n a l y s is   1 .   Me an   F1 - s co r e  v s   L 2 - R e g u lar izatio n ;   L eg e n d :  Hid d en   L a y er   ( HL )   N u m b er   o f   Neu r o n s           F i g u r e 2 . a)   C o n f u s io n   Ma tr ix   f o r   An al y s is       F i g u r e 2 . b )   No r m alized   C o n f u s i o n   Ma tr ix   f o r   An al y s is     F i g u r e 2 .   C o n f u s io n   Ma tr ices  f o r   An al y s is   1       W e  th en   r an   t h e  te s t  s et  t h r o u g h   t h e  o p ti m ized ,   tu n ed   clas s if e r   an d   o b tain ed   an   ac cu r ac y   o f   5 5 . 6 %.  A  co n f u s io n   m a tr ix   s h o w ed   th at  o u r   class i f ier   w as  esp ec ial l y   p r o n e  to   m is cla s s i f y in g   p o s iti v e  s a m p le s   a s   s h o w n   in   Fig u r e  2 .   W e  t h en   s o u g h t  t o   i m p r o v e  o u r   m o d el  b y   f u r t h er   s p litt i n g   th e   s e n ti m e n t  p o la r ities .   T h e  s e n ti m e n t  p o lar ities   w er e  s p lit  in to :  s i x   d if f er e n t  s e n ti m en t  p o lar ities :  p o s itiv e  to w ar d s   leav in g   th e   E U  ( P L ) ,   p o s itiv e   to w ar d s   r e m ai n in g   in   t h e   E U  ( P R ) ,   n eg ati v e  to w ar d s   leav in g   t h e  E U   ( NR ) ,   n e g ati v e  to war d s   s ta y in g   in   th e   E U  ( NL ) ,   n eg at iv e  to w ar d s   r e m ai n   s u p p o r ter s   ( NL R )   an d   n eu tr al  as   d escr ib ed   p r ev io u s l y .   W e  o p tim ized   t h e   class i f er   u s i n g   t h e  s a m e   p ar am eter   s p ac e  d escr ib ed   ab o v e.   T h e  cr o s s   v al i d atio n   p r o ce s s   y ield ed   a  m ea n   F1 - s co r e  o f   0 . 5 4 9   ( th is   co r r esp o n d ed   to   a  m ea n   cla s s i f icatio n   a cc u r ac y   o f   6 1 . 6 %  esti m ated   in   a  s ep ar ate  r u n   w it h   th e  s a m e   tr ain i n g   s et)   an d   a   co m b i n atio n   o f   h id d en   la y er   p ar am eter   o f   1 0 0   n e u r o n s   a n d   an   alp h a   o f   0 . 0 0 1   y ield ed   t h e  b es t  m ea n   F1 - s co r e  o f   0 . 5 5 9   as  s h o w n   i n   Fig u r e  3 .   T h e  o p ti m ized   clas s if ier   s h o w ed   i m p r o v ed   class i f icatio n   ac cu r ac y   o f   6 0 . 2 % o n   th e  te s t set a s   co m p ar ed   to   th e  f ir s t a n al y s i s   as s h o w n   i n   Fi g u r e   4.       Evaluation Warning : The document was created with Spire.PDF for Python.
IJ - AI     I SS N:  2252 - 8938       A n a lysi n g   E ve n t - R el a ted   S e n timen ts   o n   S o cia l Med i a   w ith   N eu r a l Netw o r k s   ( P .   S a n th i P r iya )   123       Fig u r e  3 .   R esu lts   o f   Gr id - Sear ch   A l g o r ith m   f o r   A n a l y s is   2 .   Me an   F1   s co r e  v s   L 2 - r e g u lar i za tio n ;  L eg e n d :  Hid d en   L a y er   ( HL )   N u m b er   o f   Neu r o n s           Fig u r e  4 . a)   C o n f u s io n   Ma tr ix   f o r   An al y s i s   2       Fig u r e  4 . b )   No r m alize d   C o n f u s io n   Ma tr ix   f o r   An al y s i     F i g u r e 4 .   C o n f u s io n   Ma tr ices  f o r   An al y s is   2       W e  f o u n d   th a t  th e  clas s i f ier   s t ill  s tr u g g led   w i th   ac c u r atel y   c lass i f y in g   p o s iti v e  s e n ti m en ts   as  b ef o r e  alth o u g h   t h e  o v er all  p er f o r m a n ce   o f   t h e  cla s s i f ier   i m p r o v ed   w it h   th e   s ec o n d   ap p r o ac h .   W e  b eliev e   th a t  t h is   i s   d u e  to   th e  n at u r e  o f   t h e  d at a  its el f   an d   t h at  o v er al l  p o s i tiv e  s tate m en t s   m i g h t   d is p la y   a  h ig h   d eg r ee   o f   v ar iab ilit y   a n d   in cl u d e  n e s ted   n eg at iv e  s tate m en t s   as  w e  o b s er v ed   w h ile  a n n o tati n g   th e  d at a.       6.   CO NCLU SI O N     Ou r   s t u d y   w as  co n d u cted   to   ass es s   i f   f i n e - g r ai n ed   s en ti m e n t  a n al y s is   co u ld   b e  p er f o r m ed   w it h   a   d ataset  ex tr ac ted   f r o m   a  co m p lex   ec o s y s te m   lik e  R ed d it.  W e  p er f o r m ed   s e n ti m en t  a n a l y s i s   an d   as s es s ed   o v er all  s en t i m e n t  co n ta in ed   i n   m u lti - s en te n ce   an d   m u lti - p ar a g r ap h   b lo ck s   o f   co m m e n ts .   Fo r   th is   r ea s o n ,   w e   u s ed   n e w   ap p r o ac h es   to   co n s tr u cti n g   f ea t u r e  v ec to r s   s u c h   a s   p ar ag r ap h   v ec to r s   th a t  ca n   b e  ap p lied   to   v ar iab le - le n g th   p iece s   o f   tex t.  W e  atte m p ted   to   d eter m i n e  if   w e  co u ld   ac c u r atel y   cla s s i f y   i f   co m m e n ter s   w er e   o v er all  p o s iti v el y   o r   n e g ati v el y   v ie w i n g   a  p ar tic u lar   e v en t.   W e  th e n   atte m p ted   to   d eter m i n e  t h e  d ir ec tio n a lit y   o f   t h e  co m m e n t ’ s   p o s itiv e   o r   n eg ati v e  s en ti m en t   w it h   m o r e   f i n e - g r ain ed   a n al y s i s ,   f o r   ex a m p le,   i f   a   co m m e n ter   w as  p o s iti v el y   v i e w i n g   leav i n g   o r   r e m ai n i n g   i n   th e  E U.   W e  f o u n d   th at  o u r   m o d el  w as  ab le  to   class i f y   o v er all  p o s itiv e  a n d   n eg at iv e  s tate m en t s   b u t  also   b e  ab le  to   d is tin g u i s h   t h e  d i r ec tio n alit y   o f   th e   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8938   IJ - AI    Vo l.  7 ,   No .   3 ,  Sep tem b e r   20 1 8   :   11 9   –   12 4   124   s tate m en t s .   W e  f o u n d   t h at  t h er e  w er e  m an if e s t  d i f f er e n ce s   in   o u r   c lass if ier ’ s   ab ilit y   to   clas s i f y   s e n ti m e n ts .   Ou r   class if er   w as  i n   b o th   m o d es  o f   an al y s i s   b etter   at  class i f y in g   n e g ati v e  an d   n e u tr al  s e n ti m en ts   t h an   p o s iti v e   s en ti m e n ts   a n d   s h o w ed   a  h i g h   d eg r ee   o f   co n f u s io n   b et w ee n   p o s itiv e  an d   n eg ati v e  s tate m e n ts .   W e  b eliev e  t h at   th is   e f f ec t  m ig h t  b e   d u e  to   a  f e w   i s s u es:  t h e  p r ep o n d er an ce   o f   n e g ativ e  s tate m en ts   i n   th e  o v er all  d ataset  an d   th e  i n ter lea v in g   o f   n eg at iv e   s tate m en t s   w i th i n   o v er all  p o s iti v e  s ta te m e n t s   as   o b s er v ed   an ec d o tall y   w h ile   an n o tati n g   t h e  d ataset.   W e  a tt e m p ted   to   o f f s et   th e   f ir s t  i s s u e  b y   u n d er s a m p lin g   t h e  m aj o r it y   cla s s e s   a n d   th i s   s h o w ed   s o m e  i m p r o v e m en t  i n   th e  class i f ica tio n   ac cu r ac y .   T o   ad d r ess   th e  s ec o n d   is s u e,   in   f u tu r e  r esear ch ,   w e   w il l  atte m p t  f u r t h er   g r ad ed   class i f icatio n ,   f o r   ex a m p le,   s o m e w h at  p o s iti v e,   s o m e w h at  n e g a tiv e,   v er y   p o s iti v e,   v er y   n e g ati v e,   to   a s s e s s   i f   t h i s   i m p r o v es   o u r   cla s s i f icatio n   ac cu r ac y .   W e  h a v e  e s tab lis h e d   th at   s ati s f ac to r y   class i f icatio n   i s   i n d ee d   p o s s ib le  w it h   a  co m p lex   d ataset   s u ch   as   o u r s   an d   th i s   m o d el  ca n   b e  u s ed   to   s o cial  m ed ia  to   ass es s   s e n ti m e n ts   as   an   ad d itio n   to   p o llin g   d ata.         RE F E R E NC E S    [ 1 ]   L .   L e e   B.   P a n g . ,   S .   V a it h y a n a th a n .   “ T h u mb s  u p ?   S e n ti me n t   c la s sifi c a ti o n   u sin g   ma c h in e   le a rn in g   tec h n iq u e s . ”   A C L - 0 2   c o n f e re n c e   o n   Em p iri c a l  m e th o d s in   n a tu ra l  la n g u a g e   p ro c e ss in g ,   V o l u m e   1 0 ,   2 0 0 2 .   [ 2 ]   Rich a rd   H.  By rd ,   P e i h u a n g   L u ,   J o rg e   No c e d a l. ,   Ciy o u   Zh u .   “ A   li m it e d   m e m o r y   a lg o rit h m   f o r  b o u n d   c o n stra in e d   o p ti m iza ti o n . ”   S IAM   J o u r n a l  o n   S c ien ti fi c   Co mp u ti n g ,   1 6 (5 ): 1 1 9 0 - 1 2 0 8 ,   1 9 9 5 .   [ 3 ]   G . C.   Ca w l e y . ,   N. L . C.   Talb o t.   “ On   o v e r - f it ti n g   in   m o d e l  se lec ti o n   a n d   su b s e q u e n t  se lec ti o n   b ias   in   p e rf o rm a n c e   e v a lu a ti o n . ”   J .   M a c h .   L e a r n .   Res ,   1 1 : 2 0 7 9 - 2 1 0 7 . ,   2 0 1 0 .   [ 4 ]   Re h u re k ,   R . ,   S o jk a ,   P .   “ S o f twa re   Fra me wo rk   fo r  T o p ic  M o d e ll i n g   wit h   L a rg e   C o rp o r a . ”   P r o c e e d in g s  o f   th e   L REC  2 0 1 0   W o rk sh o p   o n   Ne w   Ch a ll e n g e s  f o r  NL P   F ra m e w o rk s,  p a g e s 4 5 - 5 0 ,   M a y   2 0 1 0 .   [ 5 ]   J.  X .   Yu   G .   P .   C.   F u n g . ,   W .   L a m .   “ S to c k   P re d ictio n :  In teg ra ti n g   T e x t  M in in g   A p p ro a c h   u si n g   Re a lt ime   Ne ws . ”   Co mp u t a ti o n a l  I n telli g e n c e   fo r F i n a n c i a l  E n g in e e rin g ,   Ho n g   Ko n g ,   2 0 0 3 .   [ 6 ]   M .   G a m o n ,   S .   Ba su ,   D.  Be len k o ,   D.  F ish e r,   M .   Hu rst. ,   A .   C.   K¨o n ig .   “ Bl e ws:  Us in g   Bl o g s  to   Pr o v id e   Co n tex t  fo r   Ne ws Arti c les ” .  2 n d   A AA I  Co n f e re n c e   o n   W e b lo g s a n d   S o c ial  M e d ia,  S e a tt le,  W a sh in g to n ,   USA ,   2 0 0 8 .   [ 7 ]   R.   Jo w e ll . ,   B.   He d g e s . ,   P .   L y n n . ,   G .   F a rra n t. ,   A .   He a th .   “ W h o   m is led   w h o m ?   T h e   p o ll s  a n d   t h e   v o t e rs  in   t h e   1 9 9 2   b rit ish   e lec ti o n ” .   S t  C h a rle s,  Il li n o is,  1 9 9 3 a .   [ 8 ]   D.  Kin g m a . ,   J.  Ba .   “ A d a m :  A   m e t h o d   f o r  sto c h a stic  o p ti m iza ti o n ” .   a rXiv,   1 4 1 2 . 6 9 8 0 ,   2 0 1 4 .       B I O G RAP H I E S O F   AUTH O RS        S a n th i   P riy a   P .  S h e   re c e iv e d   a   B. T e c h   (Co m p u ter  S c ien c e   a n d   En g i n e e rin g )  d e g re e   f ro m   Ja w a h a rlal  Ne h ru   T e c h n o lo g ica l  Un iv e rsity ,   H y d e r a b a d   (JN T UH ),   In d ia  in   2 0 0 3   a n d   M . T e c h   (c o m p u ter  sc ien c e )  d e g re e   f ro m   JN T U H  in   th e   y e a r  2 0 0 9 .   S h e   is   d o i n g   a   p a rt - ti m e   re se a rc h   in   Un iv e rsit y   Co ll e g e   o f  En g in e e r in g   a n d   T e c h n o lo g y ,   A c h a r y a   Na g a rju n a   Un iv e rsity ,   G u n tu r,   A . P ,   In d ia.  S h e   is  w o rk in g   a s  a n   A ss is tan t  P r o f e ss o r  in   th e   De p a rtm e n t  o f   CS E  in   S ri  S a iram   Co ll e g e   o f   En g in e e rin g ,   Be n g u l u ru ,   In d ia.           V e n k a tes wa ra   Ra o   T .   H e   re c e i v e d   a   B a c h e lo r  o f   En g in e e rin g   d e g re e   in   El e c tro n ics   a n d   Co m p u ter  En g in e e rin g   a n d   a   M a ste rs  o f   En g in e e rin g   in   Co m p u ter  S c ien c e ,   a n d   a   P h . D  i n   c o m p u ter  sc ien c e   a n d   e n g in e e rin g   f ro m   W a y n e   S tate   Un iv e rsit y ,   De tro it ,   USA .   He   is  c u rre n tl y   w o rk in g   a s  P ro f e ss o r  in   KL   Un i v e rsit y ,   V a d d e sw a ra m ,   G u n tu r  D t,   In d ia.  He   h a s  m o re   th a n   3 2   y e a rs o f   e x p e rien c e   a n d   h a s p u b li sh e d   m a n y   p a p e rs i n   n a ti o n a l  a n d   in tern a ti o n a l  c o n f e re n c e s.  His   a re a s o f   in tere st are   m u lt ico re   a n d   p a ra ll e l  p r o g ra m m in g .             Evaluation Warning : The document was created with Spire.PDF for Python.