Int ern at i onal  Journ al of Ele ctrical  an d  Co mput er  En gin eeri ng   (IJ E C E)   Vo l.   8 , No .   6 ,  Decem ber   201 8,   pp. 4 554~ 4567   IS S N: 20 88 - 8708 ,  DOI: 10 .11 591/ ijece . v8 i 6 . pp 4554 - 45 67          4554       Journ al h om e page :  http: // ia es core .c om/ journa ls /i ndex. ph p/IJECE   A Novel  Hybrid  Classi fication  Ap proach f or Senti ment An alys i s  of  T ext Do cume nt        Ya s sine  Al Amr an i 1 ,  M oha med Laz aar 2 ,  Ka m al Eddin e El  Kadir i 3   1,3 LIROSA   La bo rat or y ,   Abdelma le k  Essaa di   Univ ersity ,   Morocc o   2 New T e chnol og y   Tre nds  Team ,   Abdelmale k  Essaa di   Univer sit y ,   Morocc o       Art ic le  In f o     ABSTR A CT   Art ic le  history:   Re cei ved   Feb  1 1 , 201 8   Re vised  Jun  2 0 , 201 8   Accepte d  J ul   22 , 2 01 8       Senti m ent   anal ysis  is  a  m ore   popula r  area  of  highly   a ct iv e  rese arc h  i n   Autom at ic   La ng uage   Proce ss ing.  She  assigns  a  n ega t ive   or  positi ve  polar i t y   to  one  or  m ore   e nti ties  using  diff ere nt  n at ur al   la n guage   pro ce ss in g  tool s  and   al so pre di cted  hi gh  and  low  p erf o rm anc e  of  v ari o us sent iment  c las sifie rs.  Our   appr oa ch  fo cuse s  on  the   an aly sis  of  fe el ings   result ing  from   rev ie ws   of   produc ts  using  origi nal   t ext   sea rch   techniqu es.   The se  rev iew s  ca n  be  cl assifi ed  as  h av ing  a   positi v e  or   negative  fe el ing   base d  on   c ert a i n  aspe c ts  in   rel a ti on  to   a  qu er y   base d  on  term s.  In  thi s  pa per ,   we  chose   t o  use  two   aut om at i c  le arn i ng  m et hods  for   cl assificat ion :  Support  Vec tor  Mac hine s   (SV M)  and  Ran dom   Forest,   and  we  int roduc e  a   novel   h y br id  a pproa ch  to   ide nti f y   produ ct  rev ie ws   offe red   b y   Am az on.   T his  is  useful  for   consum ers   who  want  to  re sea rch   the   se nti m ent   of  pro duct s  bef ore   p urc hase ,   o r   companie s  th at   want  to  m onit or   the   publ ic   sen t iment  of  th ei r  b ran ds.  Th e   result s  summ ari ze   tha t  th e  proposed  m et hod  o utpe rform s  the se  indi vidual   cl assifi ers  in   thi s   amaz on   dataset .   Ke yw or d:   Am azon   Cl assifi ers   Ra ndom  Fo rest   Sentim ent A na ly sis   Suppor t  V ect or Mac hin e   Copyright   ©   201 8   Instit ut e  o f Ad vanc ed   Engi n ee r ing  and  S cienc e .    Al l   rights re serv ed .   Corres pond in g  Aut h or :   Yassine  A l  A m ran i,    LIROSA   La bora tor y ,    Abdelm al ek  Esaadi U niv e rsity ,   Tet uan, Mo r oc co .   Em a il :  al a m ran iy assine@g m ai l.com       1.   INTROD U CTION   Cl assifi cat ion   is  the  process  wh e rein  a  cl as s  la bel  is  assigned   to  unla bel ed  data  vect ors.  It  can  be   cat egorized  int o  supe rv ise d  a nd   un - s uper vis ed  cl assifi cat io n  w hich  is  al s o  known  as  cl ust ering.  I n  s up e r vised  cl assifi cat ion   l earn i ng  is  do ne   with  t he  help   of  s up e rv is or  i.e.  le ar ning  th rou gh   e xam ple.   I n  this   m et ho d,   t he  set   of   possi ble  cl ass  la bels  is  known  a  pr io ri   to  the  en d  us e r   [1] .  S uper vis ed  cl assifi cat io n  can  be  sub div ide d  into  no n - pa ra m et ric  and   par am et ric   cl as sific at ion .  Pa r a m et ric  cl assif ie r  m e tho d  i s  dep e nd e nt  on   the   pro bab il it y  distribu ti on  of  each  cl ass.  N on - par am et ric  c la ssifie rs  are  us e d  wh e n  th e  den sit y  func ti on   is   unknow n.   Exa m ples   of   par a m et ric  su pervised  cl assifi cat ion   m et ho ds   are  Mi ni m al   Dista nce  Cl assifi er ,   Ba ye sia n,   Mul ti var ia te   Ga us s ia n,   S uppo rt  V ect or   m achines   an d   Decisi on  Tree.  Exam ples  of  non - pa ra m et ric  su pe r vised   cl assifi cat ion   m et ho ds  are   K -   Nea rest  Nei ghbors ,   Eucli dea n  Dis ta nce,  L ogist ic   Re gr e ssio n,  Neural   Netw ork Ker ne l Densi ty  Esti m at ion , Arti fic ia l Neural  N et work a nd Mult il ay er P erce ptr on.   Re centl y,  m ult iple  platf or m s  are  dev el op i ng  ver y  i nteresti ng  ei ther   in  te rm s  of   volum e  of  data  or  accor ding  to  t he  num ber   of  us ers  a r ound  the  w or l d,   th ey   offer   us er s  al l  th e  po s sibil it ie s  to  ex pr ess   their   op i nions  an d  t o  exc ha ng e  th ei r  ideas  with   the  oth e rs   [2] .   The  sentim ent  analy sis  f ound  in  the  f or m   of   com m ents,  re views   an d  fee db ac k  a nd  prov i des  necess ary  inf orm ation   for  var i ou s   pur poses   [3] .   The s e   op i nions  or  senti m ents  can  be  div i ded   int o  two  cat eg ori es:   po sit ive  and   neg at ive;  or  al so   cat egories  of   diff e re nt  rati ng   po i nts  (e .g.  3  sta rs,   4  sta rs  a nd   5  sta rs).  T he   po la rity   of   se nti m ents  li ke  “goo d”  a nd   “ ba d”  al s o  identify   the  se nti m ents  ei ther  po sit ive  or  ne gative   [ 4] .   Sen tim ent  analy sis   is  the  par t  of   the  te xt  m ining   that  Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N: 20 88 - 8708       A Novel  Hybri d  Cl as sif ic atio n  A pproac h  fo r  S e ntiment  …  ( Ya ssi ne  Al A m ra ni)   4555   at tem pts to  defi ne  the  op i nion s,  feeli ngs a nd   at ti tud es prese nt in  a text  or  a  set of  te xt.  It i s p arti cula rly  used in   m ark et ing   t o  a naly se  for  e xa m ple  the  com m ents  of   th e  Net  surfe rs  or  the  com par at ives  a nd   te sts  of   t he  blogg e rs.   It  req ui res  m uch   m or e  underst an di ng   of  the  la ng uag e  tha n  te xt  analy sis  and   s ubj ect   cl assifi cat ion .   Indee d,   if   the   si m plest  al go ri thm s  con side r  on ly   the   sta ti sti cs  of  f reque nc y  of  occ urre nc e  of  the   w ords ,  it   is  us ua ll y  insuffi ci en t  to  def i ne   the  do m inant  opinio n  i n  a  do c um ent.  It  i s  the  process   of   determ ining  the  con te xtu al   pola rity  o f  t he  te xt,  that is,  w hethe r  a te xt is posit ive or  ne gative   [ 5] .    The  us e  of   t his   analy sis  help s   researc he rs  a nd  decisi on - m a ker s   bette r  unde rstan d  op i nions  a nd  cl ie nt  sat isfact ion   us i ng   sentim ent  cl assifi cat ion   te chn i qu e s  in  order   t o  a uto m atical ly   colle ct   diff ere nt  pe rs pe ct ives   on   from   var io us  platfo rm s.  Ther e  has  been   a  la rg e  am ou nt   of   researc h  in  the  area  of   se nt i m ent  cl assifi c at ion .   Trad it io nally   m os t  of   it   has  f ocused  on  cl as sifyi ng   la r ge r  pieces  of  te xt,   li ke  rev ie ws  ( B.  Pang,  L.  Le e,  an d  S .  Vait hyanath an . ,  20 02).  I n  this   pa per,  a  c om par iso n  of  po pula r  cl assifi ers   was  perf or m ed  to  cl assify   product   rev ie ws  ei ther   posit ive  or  ne gativ e:   S upport  Vector  Ma chine,   Ra ndom   Fo rest  a nd   our  a ppro ac h  Ra ndom   Fo r est  S upport  V ect or Mac hin e  (RFS VM).   This  pa per   pre sents  a   m et ho d  to  determ ine  how  se nti m ents  can  be  cl assi fied  usi ng  hybri d  ap proac h  of  Sup port  Ve ct or   Ma c hin e   and   Ra ndom   Fo r es t .  T he  pa per   pro vid es   the  c om pa rison  with  oth e r  e xi sti ng  te chn iq ue,  s hows  that  t he  use   of  hy br i d  a ppr oac h  ca n  im pro ve  the   ef fici ency  of  se nti m ent  analy sis.  T he   pro po se d  hybri d  a pproach  gi ve s  bette r  res ult  as  com par e  t o  the  e xisti ng   te chn i qu e s .  T he  rest  of  the   pa pe r  is   descr i bed   as  f ol lo ws:   Sect io n  2  desc ribe  se nt i m ent  analy sis  syst e m .   Sect ion   3   int rod uces  app li ed  al gorithm s   in  this  fiel d.  Sect ion   4   discuss es  pro pose d  m et ho ds .  Se ct ion   5   ex plain  the  res ults  and   a naly sis  ob ta ined.  Sect ion   6   prese nts the  conclus ion  a nd  fu t ur e  work f or the  pr opos e d wor k.       2.   SENTIME NT  ANA L YS I S SYSTE M   To  kn ow   the  opinio n  of  the  ot her   pe ople   wa s  al ways  an  im po rtant  infor m at ion   el e m ent  du ri ng   the  decisi on  pr oce ss.  Be f or e  m akin g  decisi ons ,  pe op le   a re  in te rested  e norm ou sly   in  t he  opinio ns   of  the   oth e r  people  i n  diff e ren t  a reas.   T he y  consult  the  opinio ns  of  t he  oth e r  c on s um ers  befor e   m aking  a purc hase,  o r   lo ok   at  the o pin i ons  o f  the  oth e r  pe op le   befor e see ing  a film  w it h  the cinem a o r  befor e  buyi ng   a d isc . Th a nks  to the   i ntern et   we  ca n  disc over  the  op i nions  a nd   t he  ex pe rim ents   of   ver y  a  la r ge   nu m ber   of   pe op le   who  a re  neither   our  fr ie nds,  nor  the  ex per ts  of   fiel ds,  but  of   pe ople   who   can  hav e  the  sam e   ta ste s   that  us ,  and   th us  their   op i nions  ca n  be   ver y  us e fu l  f or   us   be fore  m akin g  our  c ho i ce  an d  to  ha ve   our  own  i dea  on  a  gi ve n  s ubj ect .   To day,  m or e  and   m or e  pe ople   are  giv i ng   t he ir  op i nion  on   diff e ren t  to pi cs,  these  opini on s  a re  avail a ble  to  ever y on e  on t he  inter net.   Accor ding  to  t he  s urveys   [ 6] ,   81%  of  the  use rs  of  the   inter net  m ade  at   least  on ce  t he  onli ne  sea rch  on   a  pro duc t  and   a pproxim ately   80 %  of   the m   declare  that  oth e r  pe op le   ha ve  a  sign ific a nt  influ e nce  on   their   decisi on  of   pur chase,  wh ic h  r epr ese nts  one  ver y  a  la rg e  num ber   of   pe op le .  Appro xim a t el y  30 %  pro vid ed  a n  op i nion  on  a  pro duct ,  on  a  se rv ic e  or   on   a  pe rson  on li ne   vi a  a  m ark in g  syst e m ,  wh ic h  is  no t  un im po rta nt   li ke  nu m ber .  F or   th is  reason,  i.e.  than ks   to  the  in te rest  wh ic h  th e  us ers  s how  f or   the  op i nions   on   the  product s  an d  the  ser vices,   the  s uppliers  of   the  arti cl es  s how   ve ry  a  gr e at   at te ntion   with  the  de velo pm ent   of   t he  m ark i ng  syst e m s  [H off m an  (20 08)].  W it h  the  e xp l osi on   of   platf orm s   li ke  the  blogs,  of   t he  disc ussi on   for um s,  Peer - to - Peer  net wor k,  and   var i ou s  oth e r  ty pes  of   so ci al   m edia,  the  consum ers  hav e  at   thei r  dis po sal   a  pl at fo rm   without  prece den t,  of   ra nge   a nd   po wer ,  m aking   it   po s sible  to  sh are  their  ex per im e nts  and   to  m a rk   their   op i nion  ( posit ive  or  ne gativ e)  on  any  pr oduct  or   se rv ic e.  The  c om pan ie s  can  m eet  the  needs  f or  the   consum ers  by  carryin g  ou t  m on it ori ng  a nd  analy sis  of  the   opinio ns   t o  im pr ov e  thei r  pro duct .  S uch  a   syst e m   will   hav e  fir stl y  to  colle ct   op inio ns   of   the   con s um ers  an d  us e rs  in  do c um ents  wh ic h  sh ow  the  s ubje ct ive   op i nions  a nd  s entences .  S ome tim es,  that  is  relat ively   easy ,  as  in   the   cases   of  gr eat   sit es  wh e re  t he  op i ni on s   of   the users  are w e ll  stru ct ured  s uch as  for  e xa m ple A m azon . com .   Sentim ent  is  a  visio n  based  on  em otion   rath er  tha n  reas on.   It  is  a   ki nd  of  su bject ive   im p ressio n,  not   facts,  al so   cal le d  the  ex pr essi on   of   sen sit ive  feeli ng   in  art  and   li te ratur e .  Sentim ent  An al ysi s  is   al so   a  t ask  of   natu ral  la ngua ge  pro cessi ng  and   i nfor m at ion   ext racti on   t ha t  aim s  to  get  the  feeli ngs  of   the  wr it er  e xp resse d   by  posit ive  or   neg at ive  c omm ents,  quest io ns   an d  r eq ues ts,  by  analy zi ng   a  gr eat   num ber   of   doc um ents.   Sentim ent  analy sis  is  the  com pu ta ti onal   te ch nique  f or  extra ct ing ,  cl assify i ng,  un der sta nd ing   a nd  determ ining  op i nions  e xpre ssed  in  va rio us  con te nt.  It  fo c us es  on   i den ti f yi ng   the  opinio n  or  se ntim ent  that  is  held  a bout  a n  obj ect .  It  us es   natu ral  la ngua ge  pr ocessin g  an d  c om pu ta ti on al   te ch niq ue s  to   a uto m at e  the  extract ion  or   cl assifi cat ion   of se nti m ent f r om  g ener al ly  u nst ru ct ure d  te xt   [7] .   In   ge ner al ,  se nti m ent  analy sis  aim s  to  determ ine  the  sta te   of   m ind   of  a  sp ea ker   or  a   wr it er  with   resp ect   to   a  subj ect   or   t he  ov erall   ton e  of   a  do c um ent.  Word   of   m ou th   is  the  proces s  of  passing  in f or m at io n  from   per son  to   ano t her   a nd   pl ay s  an  i m po rta nt  ro le   in  cl ie nt s'   decisi on   m a king  ab out  ser vices  or  pro du ct s.  In   bu si ness  sit uat ion s ,  Wo r d  of  m ou th  involve s  consum ers  w ho   s ha re  at ti tud es,  op i nions,  pro du ct s,  or   se rv i ces   with  oth e rs.   W ord of m ou th c omm un ic at ion   functi ons  base d on soc ia l net work i ng   [ 8] .   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  8 , N o.   6 ,  Dece m ber  2 01 8   :   4554   -   4 567   4556   In   recent  ye ars ,  the  m assive  i ncr ease  i n  the  us e  of  inte rn et   and   t he  exc ha ng e  of   public  op i nion  ar e   the  eng i nes  of   senti m ent  analy sis  tod ay .  The  W e b  is  an  im m ense  rep os i tory  of   str uctu red   an d  unstr uc ture d  data.  An al yz in g  this   data  t o  e xtract  la te nt  public  opinio n  an d  se ntim ent  is  a  dif ficult   ta sk.   Sentim ent  ana ly sis   can  be usef ul i n on li ne  pr oduc t rev ie ws,   rec omm end at io ns ,  b lo gs,  us er' s vi ews of p olit ic al  cand i dates.       3.   APPLIE D  AL GORIT HM S   To  eval uate  th e  perform ance  of   our  ap proac h,   w e  ch os e  to   us e  tw o  super vised  le ar ning  al gorithm s:   the  rand om  fo r est   al go rithm   wh ic h  is  a  cl as sific at ion   al gor it h m   that  red uc es  the  var ia nce   of   the  f or ecast s  of   a   decisi on  tree   a lon e,   th us   im pr ovin g  t heir  pe rfor m ances,  a nd  the   Al gorith m   of   Sup port  Vecto rs  Ma c hin es  or  Larg e  Ma rg i na l  Separ at or s  w hich  is  a  bi nary   cl assifi cat ion   m et ho d  by  super vised  le a rn i ng.  T hese  ha ve   bee n  chosen   beca use   they   a re  t he   m achine  le ar ning  al gorithm s  that  of te n  gi ve   t he  best  re su lt s  f or  a utom at i c   cl assifi cat ion   of texts.   Co ntr ol f lo w of     the  sy stem   as shown  in Figu re  1.           Figure  1 .  Co ntr ol f l ow of the  s yst e m       3.1.    R andom   Fores t   Ra ndom   fo rest,  wh ic h  we re  f or m al ly  pr op ose d  in  20 01   by  Leo  Brei m an  and   Ad èl e  Cut le r,   are  pa rt   of   the  aut om a ti c  le arn ing   te chn i qu e s.  This   al go rithm   com bin es  the  con cepts  of  ra ndom   su bspace s  and   "baggin g".   T he   decisi on   tree   fo rest  al gorit hm   trai ns   on   m ul ti ple  decisio n  trees  dr ive n  on  sli gh tl y  diff e re nt  su bse ts o f data .   Pict or ia l r ep re sentat i on of  ra ndom  f or e st as  sh ow n  in  Fi gur e 2 .   The  rand om   fo rest  is  par t  of  the  fam ily  set   m et ho ds   t ha t  ta ke  the  de ci sion   tree   as  an  in div i du al   pr e dictor ,  they   are  ba sed  on  the  m et ho ds   of  ba ggin g,   rando m iz ing   outp uts  an d  rand om   su bspace  e xc us in g  boos ti ng.   This  al gorithm   is  on e  of   t he  best  a m on g  cl assifi cat ion   al gorit hm s  -   able  to  cl assify   la rg e  am ounts  of  data  with  accu racy.  It  is  an  ensem ble  le ar ning  m e tho d  f or   cl assifi cat io n  an d  regressi on   that  co ns tr ucts  a   nu m ber   of  dec isi on   trees  at   trai ning  tim e  a nd   deliver s  th e  cl ass  that  is  the  m od e  of  the  cl asses  outpu t  by   ind ivi du al  t ree s.    In  ra ndom   for est   cl assifi cat ion  m et ho d,  m any  cl assifi ers   are  gen e rated   f ro m   s m al le r  subsets  of  the  input  data  an d  la te r  their   in di vid ual   res ults  are  a ggre gate d  base d  on  a  vo ti ng   m echa nis m   to  ge ner at e  th e   desire d  outp ut  of  the   in put  data  set .   This   ensem ble  le arn in g  str at egy  has  rece ntly   be com e  ver y  popula r .  Be fore  RF,  boos ti ng   a nd   ba gg i ng   wer e  t he  only   two  ensem ble  le ar ning  m e tho ds   us ed.   RF  ha s  been  extensi vely   ap plied  in  var i ous  area s  inclu ding  m od er n  dru g  disc ov e r y,  netw ork  int ru si on   detect io n,   la nd   cov e r  a naly sis,  cre dit rati ng a naly sis, r em ote sen si ng and  ge ne  m ic ro arr ay s  d at a a naly sis e tc ...   [9]   Ther e  are  tw o  ways  to  evalua te   the  err or   rat e.  On e  is  to  spl it   the  dataset   i nto   trai ni ng   pa rt  and   te st  par t.  W e  ca n  em plo y  the  train in g  par t  to  bu il d  the  fo rest,  a nd   the n  us e  the   te st  par t  to  calcu la te   the  err or   rate.  Anothe r  way  i s  to  us e   the  O ut   of  Ba g  ( O OB)  er r or  est im a t e.  Be cau se  rando m   forests  al gorithm   cal culat es  the   OO B  er r or   du r ing   th e  trai ni ng  phase,  we  do   no t  nee d  to  spl it   the  trai nin g  data.   Ra ndom   forest  is  ensem ble  of  decisi on trees , whic h  a re  base d on in form at i on g ai n,  t he  c om pu ta ti on  form ula is p resen t ed  as:      ( ) = − ∑ = 1 log 2    ( ) =  ( ) −  ( )     Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N: 20 88 - 8708       A Novel  Hybri d  Cl as sif ic atio n  A pproac h  fo r  S e ntiment  …  ( Ya ssi ne  Al A m ra ni)   4557   The  ste p of ra ndom  f orest  ca n be  re pr ese nted  as:   a.   Use bootst ra p  t o  e xtract  k  sam ples fr om  the original tr ai ning  sets with  N sa m ples f or   k  ti m es,   b.   Esta blish  k dec isi on  tree s,   c.   Vo te   acco r ding  to  the  cl assifi cat ion   res ults   of   al l  decisi on   trees,  the  vo ti ng   res ul ts  cal le d  confide nce   scor e  can  b e  d e scribe d  as:          =   (   )   (  ) ⁄           Figure  2 .  Pict ori al  r ep rese ntati on   of r a ndom  f orest       3. 2 .    Su pp ort   Vector  M achi ne   The  SV M  m e thod  was  intr oduce d  by  Joa chim s   [10] ,  then  us e d  by   Dr uc ke r   [11] ,  Tai ra  and    Haru no   [ 12 ] ,  a nd  Ya ng  a nd   Liu   [ 13] .  T he  geo m et ric  SVM   m et ho d  ca n  be  c onside red  as  the  at te m pt   to  fi nd ,   a m on g  al l  the   su r faces   1 ,  2 ,  ...  of  a  sp ace   of  dim ension s   |T|   wh ic h  se pa rates  the   posit ive   le arn i ng  e xam ples   from   the  neg at ives.  T he  le ar ni ng   set   is  giv e n  by  a  set   of  ve ct or s  as so ci at ed  wit h  their  c la ss  of   m e m ber sh i p:   ( 1 , 1 ) , ( 2 , 2 ) , … , ( , ) ,     ,     { + 1 , − 1 }   with:   a.   represe nts the c la ss of m e m b ersh i p.   I n  a t w o - cl ass  proble m   the f irst cl as s corres ponds  to  a  posit ive  answer  ( = + 1 ) , a nd th e seco nd class  corres ponds to   a n e gative a nswer   ( = − 1 ) .   b.     re pr ese nts the   vecto r of  t he  te xt num ber   j   of   the traini ng set .   The   S upport  Vecto r  Ma chine  m e tho d  se pa rates  the  posit ive  cl ass  vector s  f r om   the  neg at ive  cl as s   vecto rs by a  hyperplane  d e fin ed by t he f ollo wing e qu at io n:     ⊗ + ,     ,         Fo r  tw o  cl asse s  of   exam ples  giv e n,   the  goa l  of   SV M  is  to  fin d  a  cl assi fier  that  will   separ at e  the  dat a  and  m axi m iz e  the  distance  betwe en  thes e  tw o  c la sses   [ 14 ] .  Wi th  S VM,  this  c la ssifie r  is  a  li near   cl as sifie r  cal le d  hype r  pla n  ( ) .  I n  the  f ollo wing  diag ram ,  we  de te rm ine  a  hype rp la ne  that  se par at es  t he  tw o  set s  of   point s.   Sepa rati on of t wo sets  with se par at or  a s s hown in Fi gure  3.     Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  8 , N o.   6 ,  Dece m ber  2 01 8   :   4554   -   4 567   4558       Figure  3 .  Se parat ion   of tw o  se ts wit h  se pa rator       In   ge ner al ,   suc h  a  hype rp la ne  is  no t  uniqu e   [ 15 ] .  The   SV M  m et hod  determ ines  the  opti m a l  hype rp la ne by m axi m iz ing  the m arg in: t he m arg in is t h e  di sta nce b et wee n  the  posit ive l abeled  vecto rs and t he   neg at ive   la bel ed  vecto rs.   T he  le ar ning  s e t  is  not  neces saril y  li near ly   sepa rab le ,   va riables  of  ga p    are  introd uced  f or   al l  the   .  Th e se    ta ke  i nto  account  t he  e rror  of   cl assif ic at ion ,  a nd  m us t  sat isfy  the    fo ll owin g  i nequali ti es:     ⊗ +   ≥ 1 −   ⊗ +   ≤ 1 +     We  ha ve  t o  m i nim iz e  the  fo ll ow i ng  f unct io n  of  obj ect ive   by  ta ki ng  int o  account  t hese   const raints:  1 2 ‖ ‖ 2 + ∑ = 1 .  The  first  te rm   of   t his  f un ct io n  co rr e spo nd s  t o  the  siz e  of   t he   m arg in  a nd   t he  sec ond  te rm   represe nts  the   cl assifi cat ion   e rror,  wh e re    re pr ese nts  t he  num ber   of  vect or s   of  t he  trai ni ng   set .  Fi nd i ng  the  pr e vious  ob j e ct ive  functi on  a m ou nts  to  so lvi ng   the  f ol lowing  quad r at ic   pr oble m :  fin ding  the  de ci sion  functi on  ℎ   su c h t hat:  ℎ ( ) =  ( ( ) )   w her e:     ( ) = ∑ ⊗ + = 1      ( )   re pr ese nt the  foll ow i ng fu nction:   a.   if  > 0   then   ( ) = 1   b.   if  < 0   then   ( ) = − 1   c.   if  = 0   then   ( ) = 0     re pr ese nt the  c la ss of m e m ber sh ip ,     re pr ese nt the  param et ers  to b e  foun d   ⊗   re pr ese nt the  s cal ar prod uct  of the  v ect or   Xi  with the  v ect or X .   The  near est   po ints,  w hich  al one  are  us e d  for   determ ining   t he  hy perplane ,   are  cal le d  s up port  vect or s .   Hy pe rp la ne  of   support  vecto r  m achine  as  s how n  in  Fig ure  4.   It  is  ob vious  that  t her e  is   a  m ult it ud e  of   valid   hype rp la ne  but  the  re m ark abl e  pr ope rty   of   the  SV M  is  that  this  hyper pla ne  m us t  be  op tim a l   [16] .  W e   are   go i ng   t o  lo ok  for  it   thu s  m ore  a m on g  the  va li d  hype rp la ne s,  the  on e  w ho  cr os ses  "i n  t he  m idd le "  po i nts  of   bo t h  cl asses   of   exam ples.  I nt uiti vely ,  it   co m es  dow n  to   l ooking  f or  the   "safest"   hype r plane.  I ndeed ,  le t  us   su pp os e  t hat  a n  e xam ple  was   not  pe rfec tl y  descr i bed,  a   s m al l  var ia ti on   will   no t   m od ify   it s  cl assifi cat ion   i f  it s  distance  in  th e  hyperplane  i s  big .  F orm all y,  this  a m ou nt s  to  lookin g  f or   a  hyperpla ne  w hose  m in i m u m   distance  to  the   le arn in g  exam ples  is  m axi m um .  This  distance  is  cal le d  "m arg in"  bet we en  the  hype r plane  an d  the ex am ples.  The o pti m al   separ at or   hype r plane  is t he on e  that m axi m iz es  the m arg in   [17] .   In t uiti vely ,  the   fact  of  hav i ng   a  wi der   m arg i n  gets  m or e  se cur it y  w he n  cl assify ing   a   ne w  e xam ple.   More ov e r,   if  w e  find   the  cl ass ifie r  wh ic h  be ha ves  best  wit h  resp ect   to  the  l earn i ng   data,  it   i s  cl ear  that  i t  will   Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N: 20 88 - 8708       A Novel  Hybri d  Cl as sif ic atio n  A pproac h  fo r  S e ntiment  …  ( Ya ssi ne  Al A m ra ni)   4559   al so   be   the  one   w ho   will   at   be st  al low  to   cl assify   the  ne w  e xam ples.  On  the  on e  ha nd  F i gure  5   s hows  us  that   with  an  opti m a l  hyper pla ne,   a   new   exam ple  rem ai ns   cl assif ie d  well   wh il e  it   fall s  in  the  m arg in.  O n  the   oth er  hand, we  noti ce o n  the   F ig ure   6   t hat w it h a s m al le r  m arg in, t he  exam ple se es it sel f  ba dly  cl assifi ed.           Figure  4 .  Hy pe rp la ne of s up port  vecto r  m achine           Figure  5 .  Be st  hype rp la ne  se pa rator           Figure  6 .  Hy pe rp la ne wit h  lo w  m arg in   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  8 , N o.   6 ,  Dece m ber  2 01 8   :   4554   -   4 567   4560   In   ge ner al ,  t he   cl assifi cat ion   of   a  ne w  un know n  exam ple  is  giv e n  by  it s  posit ion   rela ti ve  to  the  op ti m al   h yperp la ne.   f or   e xa m ple,  in  the  F igure  5,   the  ne w  el em ent  will  be  cl assifi ed   in  the  cat e gory   of   re d  balls i ns te a d of g reen ball s.       4.   PROP OSE D MET HO D   In   t his  arti cl e,   we  pro po se   a   m e tho d  w hic h  c om bin es  th e  powe r  a nd  the  ca pab il it ie s  of  Ra ndom  Fo r est   an d  S uppo rt  Vect or  Ma chines  at   the  sam e  tim e  for  the   s up e r vi sed  ta s ks   to   s olv e  t he  pro bl e m   of   cl assifi cat ion .   Firstl y,  Ra ndom   fo rest  is  an   ensem ble  le ar ning  m et ho d  that  co ns tr uct  a  nu m ber   of  de ci sion  trees  at   ran do m ly  sel ect ed  featur es  an d  pr edict   the  cl ass  of   a  te st  instance  by  vo ti ng  of  the  ind i vidua l  trees.  Suppor t  Vecto r  Ma chine  re volves  a rou nd   t he  noti on  of  a   m arg in - ei t her  side  of  a  hy pe rp la ne  that  se par at es   two  cl asse s.    Ma xim iz ing   the  m arg in  a nd  wit h  this  w ay   creati ng   t he   la rg est   poss ible  distance  betwee n  the   separ at in g  hy pe rp la ne  an d  th e  instances   on  ei ther  side  of  it   has  bee n  pro ve n  to  re du ce  a n  uppe r  bo und  on   the   exp ect e d  ge ne rali zat ion   er ror.   RF  wa s  not   sensiti ve  to  i nput  pa ram et e rs;  thu s ,  we  just  us e d  the  def a ult  par am et ers  for   each  cl assifi e r.   T he  trai ne d  cl assifi ers  retu rn   sc or e s  bet w een  0  a n d  1,  these  sc or es  a r e  then  trans form ed  to  a  bin a ry  sta te   ind ic at in g  ‘ neg at ive ’  or   ‘ po sit ive ’.   For  each  c om bin at ion ,   the  e xistence  of   el e m ent  is  consi der e d  posit ive  (P)  or  ne gative  (N).   Be fore  tur ning  to   pola rity ,  it   m ay   be  interest ing  to   identif y   wh et her  t he  do cum ent  cor r es ponds  t o  a  s ub j ect ive  opinio n  or  a n  obj ect iv e  fact.  We  w ould  ha ve  a  t w o - ste p   analy sis.   O bjec ti vity  an d  s ubje ct ivit y as sh own  in Fi gure  7.           Figure  7 .  O bje ct ivit y and  s ub j ect ivit y       The  nota ti on  of  TP   in dicat es  Tru e   P os it ives:   num ber   of   exa m ples  pr edict e d  posit ive  that  are  act ually   po sit ive ,  FP  i ndic at es  False   P os it ives:  num ber   of  exam ples  pr e dicte d  posit ive  that  are  ac tuall y  neg at ive ,  TN   ind ic at es  Tr ue  Neg at ive s:  num ber   of   exam ples  pr edict ed  ne gative  that  ar e  act ually   neg at ive  and   F N  in dicat es  False  N e gative s: n um ber  of e xam ples p re dic te d  ne gative  th at  are  act ually   po sit ive .   The  cl assifi cat ion   m et rics  consi der e d  f or   th e   senti m ent  analy sis  are  Accur acy ,  Pr eci sio n,  Re cal l  and   F - Me asu re  a nd  these  pa ram eter s  are  e valuat ed  ba sed  on  th e  cal cul at ed  po sit ivit y  and   ne gativit y  of   rev i ews  by   the  propose d  hybr id  a ppr oach.  The  pe rfor m ance  eva luati on   of  cl assifi ers  is  m a de  accor di ng   to  the    fo ll owin g form ulas:   Re port of t he  tr ue posi ti ves.   It  corres ponds to:         =    (  +  ) ⁄     It  is  thus  the  re port  bet wee n  the  nu m ber   of   posit ive  insta nc es  cl assifi ed  w el l  and   t he  tota l  nu m ber   of   el e m ents  wh ic h  s hould  be  cl assifi e d  well .   Re port  of  the  false  po sit ive  on e .  He   corres ponds,  sy m m e tric al ly  in  the  pr e vious  de fini ti on :         =    (  +  ) ⁄     The  datum   of   t he  rates   TP  Ra te   and  FP  Ra te   al lows   t o  reconstr uct  the  m atr ix  of  co nfusi on  f or  a  giv e n  c la ss.   Pr eci sio n  is  th e  repo rt  betwe en  the  num ber   of   t he  tr ue  posi ti ve  an d  the  s um   of   the  tr ue  posit ives  a nd   t he   false   po sit ive . A  value of  1 ex pr e ss es  the  fact t hat  al l t he  posit ive  cl assifi ed  e xa m ples w ere r ea ll y:     Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N: 20 88 - 8708       A Novel  Hybri d  Cl as sif ic atio n  A pproac h  fo r  S e ntiment  …  ( Ya ssi ne  Al A m ra ni)   4561     =  (  +  ) ⁄     Re cal l  is  the  pe rcen ta ge  of  c orrect  it em s  that  are  sel ect e d.  recall   of  1  m eans  t hat  al l  th e  posit ive  e xa m ple s   wer e  foun d.      =  (  +  ) ⁄     Accuracy   is  a  com m on   m eas ur e for  the  cl as sific at ion   pe rfo rm ance  and   it ’ s  pro portion al  o f  c orrectl y  cl a ssifie d  instances  to  th e  total   nu m ber   of   insta nces,   wh er eas  the  error   rate  use s   incorrect ly   classified  rathe r   than   correct ly .        = (  +  ) (  +  +  +  ) ⁄     This  qu a ntit y  al lows   to   gro up  in  a  sin gle  nu m ber   the   pe rfor m ances  of  the  cl assifi er  ( for  a  giv e n  cl ass)  as  reg a rds Rec al l  and the  Pr eci si on :     −  = ( 2 ∗  ∗  ) (  +  ) ⁄       5.   R ESULT S  AND DI SCUS S ION S   To  eval uate  our  a ppr oach,  we  us e d  the  " Am azon "   data set   wh ic h  c onta ins  1000  inst ances  di vid e d  into  po sit ive  ( 500)  a nd  ne gative  ( 500).  We  di vid ed   this  data   into  t wo   set s:  a  trai ning   s et   and  a  te st  set .  I n  thi s   arti cl e, Cro s s  Vali dation   m eth od  with  f old   va lue equal  t o 1 0 has  bee n use d for trai ning a nd test ing p has es.   We  will   us e  so m e  te chn ique s  that  autom at ic al ly  extracts  this  data  into  po sit ive  or  ne gative   sentim ents.  By  us in g  th e  sent i m ent  analy sis,  the  cu stom er  can  know  the  feedbac k  a bo ut   the  pro duct   be fore   m aking   a  purc hase.  Sentim ent  analy sis  is  a  ty pe  of  nat ur al   la nguag e   proce ssing   f or   trac ki ng   t he  m oo d  of  the   public ab out a  par ti cula r product .     5 . 1.     Usin g R andom  F orest   Table   1   sho w   the  res ult  obt ai ned   us in g  t he   Ra ndom   Fo r est   al gorithm .  Lo ok i ng   at   t he   res ults  of     T able   1 ,  we  no ti ce  that  82 0  r eviews  are  c orrectl y  cl assifi e d  am on g  1000,   and   18 0  re views  are  m isc la s sifie d.   Figure  8   s how  the  c os t  of   r a ndom   f orest   f or   cl ass  p os it ive.   Figure  9   s how  the  c os t  of   r a ndom   f orest   f or   cl ass  n egati ve .       Table  1.   C ro s s  Vali dation R es ults f or Ran dom  Fo rest     Po sitiv e   Neg ativ e   Total   Po sitiv e   415              85              500   Neg ativ e   95              405              500   Total   510              490              1000           Figure  8 .  Cost  analy sis o f  ra ndom   forest al gorithm  f or cla s s posit ive   Evaluation Warning : The document was created with Spire.PDF for Python.
                          IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  8 , N o.   6 ,  Dece m ber  2 01 8   :   4554   -   4 567   4562             Figure  9 .  Cost  analy sis o f  ra ndom  f orest  alg or it hm  f or cla s s n e gative       5 . 2 .    Usin g Su ppo r t Vect or Mac hine   Table   2   s how   t he  res ult  obta ined   us in g  S up port  Vecto r  M achine   al gorith m .  Loo ki ng  at   the  re su lt s  of  T able   2 ,  we  no ti ce  that  82 4  r eviews  are  c orrectl y  cl assifi e d  am on g  1000,   and   17 6  re views  are  m isc la s sifie d.   Figure  1 0   s ho w  th e  c os t  of  s upport  v ect or  m achine  f or  c la ss  p os it ive.   Figure  1 1   s ho w  th e  c os t  of  s upport   v ect or  m achine for  class   n e gat ive.       Table  2 .  Cr oss  Vali dation R es ults f or S uppor t Vecto r  Ma chi ne     Po sitiv e   Neg ativ e   Total   Po sitiv e   409              91              500   Neg ativ e   85              415              500   Total   494              506              1000   Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N: 20 88 - 8708       A Novel  Hybri d  Cl as sif ic atio n  A pproac h  fo r  S e ntiment  …  ( Ya ssi ne  Al A m ra ni)   4563       Figure  10 .  C ost  an al ysi s of s uppo rt v ect or  m achine al gorith m  f or  class  pos it ive           Figure  11 .  C ost  an al ysi s of s uppo rt v ect or  m achine al gorith m  f or  class  negat ive       5 . 3 .    Usin g R andom  F orest  Support  V ec t or Mac hine   Table   3   s how   the  res ult  obt ai ned  us i ng  our   ap proac h  R andom   Fo re st  Sup port  Vect or  Ma chi ne  al gorithm   ( RFSVM ) .  Lo o king  at   the  res ults  of   T a ble   3 ,  w e  no ti ce  that  847  rev ie ws  are   correct ly   cl assifi ed   a m on g  1000,  a nd   153  re view s  are  m isc la ssi fied.   Fi gure  1 2   sh ow   the  Cost   of   Ra ndom   Fo rest  S upport  Vecto r  Ma chine  f or  cl ass  Po sit ive.   F igure  1 3   s how   the  Cost  of  Ra ndom   Fo rest  Suppor t  Vecto r  Ma chine  for  cl ass  Neg at ive .       Table  3 .  C ro s s  Vali dation R es ults f or RFS V M     Po sitiv e   Neg ativ e   Total   Po sitiv e   422              78              500   Neg ativ e   75              425              500   Total   497              503              1000   Evaluation Warning : The document was created with Spire.PDF for Python.