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 0 2 ~ 1 0 6   I SS N:  2502 - 4752 ,   DOI : 1 0 . 1 1 5 9 1 / i j ee cs . v 1 2 .i 1 . p p 102 - 1 0 6           102       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   M a chine Lea rnin g   w ith  PySpa r k   -   Rev iew       Ra s w it ha   B a nd i 1 J   A m ud ha v el 2 ,   K a rt hik 3   1 De p a rtme n o f   In f o rm a ti o n   T e c h n o l o g y ,   M L In stit u te o f   T e c h n o lo g y ,   H y d e ra b a d ,   In d ia   3 De p a rtme n o f   Co m p u ter S c ien c e   a n d   E n g in e e rin g ,   KL   Un iv e rsit y ,   G u n tu r,   In d ia   1 ,2 M L In stit u te o f   T e c h n o lo g y ,   H y d e ra b a d ,   In d ia       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Feb   1 0 ,   2 0 1 8   R ev i s ed   A p r   2 1 ,   2 0 1 8   A cc ep ted   Ju n   1 8 ,   2 0 1 8       A   r e a so n a b le  d istri b u ted   m e m o ry - b a s e d   Co m p u ti n g   s y ste m   f o m a c h in e   lea rn in g   is  A p a c h e   S p a rk .   S p a rk   is  b e in g   su p e rio in   c o m p u ti n g   w h e n   c o m p a re d   w it h   Ha d o o p .   A p a c h e   S p a rk   is  a   q u ick ,   si m p le  to   u se   f o h a n d li n g   b ig   d a ta  th a h a w o rk e d   in   m o d u les   o f   M a c h in e   L e a rn in g ,   stre a m in g   S QL,   a n d   g ra p h   p r o c e ss in g .   W e   c a n   a p p ly   m a c h in e   lea rn in g   a lg o rit h m to   b ig   d a ta  e a sil y ,   w h ich   m a k e s it   si m p le b y   u sin g   S p a rk   a n d   it s m a c h in e   lea rn in g   li b ra ry   M L li b ,   e v e n   th is  c a n   b e   m a d e   s im p ler  b y   u sin g   th e   P y th o n   A P I   P y S p a rk .   T h is  p a p e p re se n ts  th e   stu d y   o n   h o w   to   d e v e lo p   m a c h in e   lea rn in g   a lg o rit h m s   in   P y S p a rk .   K ey w o r d s :   A p ac h s p ar k   Ma ch i n L ea r n i n g   P y Sp ar k   SC AL A   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 :   R as w i th B an d i ,   KL   U n i v er s it y ,   I n d ia .   E m ail:  r as w i th a. 2 9 r ed d y @ g m ail. co m       1.   I NT RO D UCT I O N   T h v o lu m o f   i n f o r m atio n   g ath er ed   h as  b ein g   p u a w a y ,   w h at s   m o r e,   b r o k d o w n   h as   d eto n ated ,   s p ec if icall y   i n   co n n ec t io n   to   th ac tio n   o n   t h W eb   an d   c ell  p h o n es,  an d   in   ad d itio n   i n f o r m atio n   f r o m   t h e   p h y s ical  w o r ld   g at h er ed   th r o u g h   s e n s o r   s y s te m s .   At  th p o in w h e n   lo o k ed   w ith   t h i s   a m o u n o f   in f o r m atio n   r ap id ly   w in d   u p   n o ticea b l y   i n f ea s ib le   [ 1 ] .   T h is   h a s   p r o m p t ed   an   a s ce n t   w h ich   is   ca lled   as  h u g i n f o r m atio n   an d   m ac h in lear n i n g   f r a m e wo r k s .     I n   th er o f   o p en   s o u r ce   ad v an ce s   w h ich   ca n   b u s ed   to   d ea w it h   en o r m o u s   d ata.   T h m o s o f   th e s e   in n o v atio n s   i s   A p ac h Had o o p   ( b y   m ea n s   o f   Had o o p   Ma p   R ed u ce ,   s tr u ctu r to   p e r f o r m   ca lc u latio n   in   p ar allel  cr o s s w i s o v er   n u m er o u s   n o d es).     E v en   t h o u g h ,   Ma p   R ed u ce   h as  s o m i m p er ati v w ea k n e s s es,  co u n tin g   n u m b er   o f   o v er h ea d s   to   d is p atch   ea c h   ac t iv i t y   an d   a s s u r a n ce   o f   s to r i n g   d ata  a n d   i n ter m ed iate   r es u lts ,   b o th   o f   w h ic h   m a k Had o o p   m o d er atel y   u n s u itab le  o r   u tili ze   in s ta n ce s   o f   a n   iter ativ a n d   lo w - i n er tn e s s   n at u r e.   A p ac h Sp ar k   is   an o th er   s tr u ct u r w h ich   i s   ap p r o p r iate d   f ig u r in g   t h at  i s   in ten d ed   to   b u p g r ad ed   f o r   lo w - in er t n es s   er r an d s ,   f o r   s to r in g   in ter m ed iate  d ata  r esu lts   i n   m e m o r y .   I is   ap p r o p r iate  f o r   an   ap p licatio n   w h ic h   is   it er ativ an d   m ac h i n e   lear n in g .   P y t h o n   is   u s ed   f o r   h i g h   le v el  p r o g r a m m in g   lan g u ag e   f o r   g e n er a p u r p o s p r o g r a m m i n g .   I n   t h ese   d ay s   P y th o n   b ec o m es  m o s p o p u lar   lan g u ag f o r   d ata  s cien tis ts .   Fo r   d ata  s cien tis it  is   d if f ic u lt  to   d ev elo p   ML   al g o r ith m s   w i th   p y th o n   with o u t i n cl u d in g   S C AL A   la n g u ag [ 1 - 2 ] .   I n   th i s   p ap er ,   th f ir s s ec tio n   d escr ib es  ab o u s p ar k   co r tech n o lo g ies  an d   co m p o n e n t s .   Seco n d   s ec tio n   d escr ib es h o w   to   d ev el o p   m ac h in lear n i n g   al g o r ith m s   i n   P y Sp ar k .           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       Ma ch in Lea r n in g   w ith   P yS p a r -   R ev iew   ( R a s w ith a   B a n d i )   103   2.        SPAR K   CO RE   T E CH NO L O G I E S AN I T S CO M P O NE NT S   Sp ar k   is   f r a m e w o r k   f o r   Dis tr ib u ted   co m p u tin g   w h ic h   d ep e n d s   o n   Had o o p   Ma p   R ed u ce   a lg o r ith m s .   I in g e s ts   t h p o in t s   o f   i n ter e s o f   Had o o p   Ma p   R ed u ce ,   y et  n o at  all  li k Ma p   R ed u ce ,   s p ar k   ca n   s to r i n   m e m o r y   th i n ter m ed iate  d ata  an d   r esu lt s ,   w h ic h   i s   ca lled   Me m o r y   C o m p u ti n g   [ 3 ] .       Me m o r y   C o m p u ti n g   e n h a n ce s   t h p r o d u ctiv it y   o f   d ata  c o m p u ti n g .   Sp ar k   is   m o r q u alif ied   f o r   iter ativ ap p licatio n s ,   f o r   ex a m p le,   Data   Min in g   a n d   Ma c h in e   L ea r n i n g .   T h R DD  ( R esil ie n Di s tr ib u te d   Data s et)   i n   Sp ar k   i s   a   Fa u lt   t o ler an co llectio n   o f   co m p o n en ts   t h at  ca n   b w o r k ed   i n   p ar allel  an d   p er m its   c lien t s   to   ex p r ess l y   s to r th in f o r m atio n   i n   co m p ac d i s k   a n d   m e m o r y   [ 4 ] .   On ca n   u t ilize  R D to   ac co m p li s h   s o m n e w   h i g h li g h t s   t h at  is n ' b o ls ter ed   b y   t h v a s m aj o r ity   o f   cu r r en b u n c h   p r o g r a m m i n g   m o d el s   an d   p r io r   p r o g r am m i n g   m o d els.  Fo r   ex a m p le,   I ter ati v A l g o r ith m s ,   SQ L   q u er y ,   B atch ,   Flo w .   R DD  i s   p er u s ed   j u s i n f o r m atio n   s et s ,   an d   it  ca n   r ec all  t h o p er atio n s   o f   d iag r a m .   R DD  g i v es  w ell   ar r an g e m e n o f   o p er atio n s   to   co n tr o l th in f o r m atio n   [ 5 ] .     Sp ar k   p r o v id es  A P I s   in   J av a,   Scala,   P y th o n   an d   R ,   is   a n   o p ti m ized   e n g i n w h ic h   s u p p o r ts   ex ec u tio n   g r ap h s   g en er all y .   I lik e w i s b o ls ter s   h u g ar r an g e m e n o f   m o r elev ated   a m o u n d ev ices  co u n t in g   Sp ar k   SQL   f o r   SQ L ,   ML lib   f o r   m ac h in lear n i n g ,   Gr ap h f o r   ch a r t p r ep ar in g ,   an d   Sp ar k   Stre am i n g .   Sp ar k   C o r co m p r is es  o f   g e n er al  ex ec u tio n   e n g in f o r   s p ar k   p latf o r m   t h at  all  r eq u ir e d   b y   o th er   u s e f u ln e s s   w h ic h   is   b ased   u p o n   ac co r d in g   to   t h p r er eq u is ite  ap p r o ac h .   I p r o v id es  in - b u i lt  m e m o r y   co m p u ti n g   a n d   r ef er en c in g   d at s ets s to r ed   in   ex ter n al  s to r ag [ 7 - 8 ] .     Sp ar k   en ab le s   th d esi g n er s   to   co m p o s co d r a p id ly   w it h   th ass i s ta n ce   o f   r ich   o p er ato r s .   W h ile  it   tak es  co n s id er ab le  m ea s u r o f   lin es  o f   co d e,   it  tak es  f e w e r   lin es  to   co m p o s s i m ilar   c o d in   Sp ar k   Scala.   Fig u r 1   s h o w s   t h co r tech n o lo g ies  an d   co m p o n e n t s   o f   Sp a r k .   E ac h   co m p o n e n o f   Sp ar k   co r ar ex p lain ed   in   th u p co m i n g   s ec tio n s   o f   t h p ap er .             Fig u r e   1 .   A p ac h Sp ar k   co r e       2 . 1 .      Sp a rk   SQ L   Sp ar k   SQ L   is   s eg m e n o v e r   Sp ar k   co r th at  g iv es  a n o th er   ar r an g e m e n o f   d ata  r ef lec tio n   ca lled   R DD, w h ich   o f f er s   h elp   f o r   b o th   th o r g a n ized   an d   u n s tr u ct u r ed   in f o r m atio n   [ 6 ] .     T h ex a m p le  o f   Hi v Qu er y :   /s co n te x t is a  c u r r en t Sp ar k C o n tex t.    Val  s q lC o n tex t = Ne w     o r g . ap ac h e. s p ar k . s q l.h i v e. Hi v eCo n te x t( s co n tex t)     s q lC o n te x t.sq l( " C R E A T E   T A B L E   I F NO T   E XI S T S src   ( k ey   I NT ,   esteem   ST R I NG) " )     s q lC o n te x t.sq l( " L O A D A T A   L OC AL   I NP A T ' ca s es/ s r c/p r im ar y /as s ets/ k v 1 . tx t '   I NT T A B L E   s r c" )     /Qu er ies ar co m m u n icate d   in   Hiv eQ L     s q lC o n te x t.sq l( " FR OM   s r SEL E C T   k e y ,   v al u e" ) . co llect( ) . f o r   ea ch ( p r in tln ) .     2 . 2 .      Sp a rk   Str ea m i ng   T h is   p ar en ab les  Sp ar k   to   p r o ce s s   r ea l - t i m e   s tr ea m i n g   d at a.   I g iv e s   a n   A P I   to   co n tr o d ata  s tr ea m s   th at  m atc h es  w i th   R DD  A P I .   I en ab les  t h d ev elo p er s   t o   co m p r eh e n d   t h tas k   a n d   s w itc h   th r o u g h   t h e   ap p licatio n s   th at  co n tr o th e   d ata  an d   g iv i n g   r es u lt  co n tin u o u s l y .   L i k Sp ar k   C o r e,   Sp ar k   Stre a m i n g   en d ea v o r s   to   in f l u en ce   t h f r am e w o r k   to   b la m to ler an t a n d   ad ap tab le  [ 9 - 1 0 ] .     RDD  AP I   E x a m p le   I n   th is   e x a m p le,   u s f e w   tr an s f o r m atio n s   th at   ar i m p le m en ted   to   b u ild   d atase o f   ( s tr in g ,   in t)   p air s   ca lled   co u n ts   a n d   th e n   s a v it to   f ile.     T ex t - f i le  s co n te x t.te x tf ile( h d f s :// …”)   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 0 2     106   104   C o u n ts te x t - f i le. f lat m ap ( la m b d lin e:lin e. s p lit(   ”) ) .   Ma p ( la m d w o r d   , 1 ) ) . r ed u ce B y K e y ( la m b d a   a, b :a+ b ) .   Sav t h f i le  as:   C o u n ts . s a v e AsT ex tFi le( “h d f s : //…”)     2 . 3   M L lib   ( M a chine   L ea rni ng   L ibra ry )   A p ac h Sp ar k   i s   o u tf i tted   w it h   r ich   lib r ar y   k n o w n   a s   M L li b .   T h is   lib r ar y   co n tai n s   w id ex h ib it o f   m ac h in lear n i n g   ca lc u latio n s ,   clas s i f icatio n ,   cl u s ter in g   an d   co llab o r atio n ,   an d   s o   o n .   I ad d itio n all y   in co r p o r ates  f e w   lo w er - le v el  p r im iti v es.  E v er y   o n o f   th e s f u n ctio n a liti es  e n ab le  Sp ar k   to   s ca le  o u o v er   a   b u n c h   [ 1 1 ] .       2 . 3 . 1   F o re ca s t   w it h L o g is t ic  Reg re s s io   I n   th i s   ill u s tr atio n ,   w tak d ataset  estee m s   as  f ar   as  n a m es  an d   h i g h li g h v ec to r s .   W f i g u r o u t   h o w   to   f o r esee  t h e   m ar k s   f r o m   h i g h lig h t   v ec to r s   u tili zi n g   th s tr ateg y   f o r   L o g is tic   R e g r ess io n   ca lcu la tio n   u tili zi n g   th p y th o n   d ialec t:      #   E v er y   r ec o r d   o f   th i s   Data Fra m co n tai n s   t h n a m a n d     #   f ea tu r es r ep r esen ted   b y   v e cto r .     d f   s q lC o n te x t.c r ea teDa ta Fra m e( d ata,   [ " lab el " ,   " f ea tu r es" ] )     #   Set p ar am eter s   f o r   th ca lc u l atio n .     #   Her e,   w r estra i n   t h q u an tit y   o f   e m p h ase s s   to   1 0 .     lr   L o g is ticR e g r es s io n ( m ax I t er =1 0 )     #   Fit   th m o d el  to   th i n f o r m at io n .     d is p la y   lr . f it(d f )     #   Giv en   d ataset,   a n ticip ate  e ac h   p o in t ' s   n a m e,   an d   d e m o n s t r ate  th o u tco m e s .     m o d el. tr a n s f o r m ( d f ) . s h o w ( )     2 . 4   G ra ph X   Sp ar k   ac co m p a n ies  a   lib r ar y   to   co n tr o th e   g r ap h s   a n d   p er f o r m i n g   ca lc u latio n s ,   ca lled   a s   Gr ap h X .   Mu ch   t h s a m as  Sp ar k   Stre a m i n g   a n d   Sp ar k   SQ L ,   Gr ap h ad d itio n all y   ex p a n d s   Sp ar k   R DD  A P I   w h ic h   m ak e s   co o r d in ated   g r ap h .   I ad d itio n all y   co n tai n s   v ar i o u s   ad m in i s tr ato r s   s o   a s   to   co n tr o th g r ap h s   alo n g s id d iag r a m   ca lc u latio n s .     C o n s id er   th ac co m p an y i n g   c ase  to   d is p la y   clien ts   a n d   ite m s   as a   b ip a r tite g r ap h   w m a y   t ak af ter     C las s   Ver tex   P r o p er ty   ( )     C ase  clas s   User   P r o p er ty   ( Val  n a m e : Str i n g )   ex p a n d s   Ver tex   P r o p er ty     C ase  clas s   P r o d u ct  P r o p er ty   ( Val  n a m e:  Stri n g ,   Val  v al u e:  Do u b le)   ex p an d s   Ver te x   P r o p er t y     /T h ch ar m a y   t h e n   h a v t h s o r t:    V ar   d iag r a m : G r ap h   [ Ver tex   P r o p er ty ,   Strin g ]   in v alid       3 .        DE VE L O P M E NT   O F   M ACH I NE   L E AR NIN G   A L G O RI T H M S USI N G   P YSP ARK   P y t h o n   is   a n   i n te n s p r o g r a m m i n g   d ialec f o r   d ea lin g   w it h   co m p le x   d ata  a n al y s i s   a n d   d ata  m u n g i n g   task s   [ 1 ] [ 3 ] [ 1 2 ] .   I h as  a   f e w   i n - co n s tr u cted   lib r ar ies   an d   s y s te m s   to   d o   in f o r m at io n   m i n i n g   er r an d s   p r o f icien tl y .   I n   an y   ca s e,   n o   p r o g r am m i n g   d ialec alo n ca n   d ea w it h   en o r m o u s   i n f o r m at io n   h a n d li n g   p r o d u ctiv el y .   T h er is   co n s ta n tl y   r eq u ir e m en f o r   co n v e y e d   r eg is te r in g   s tr u ct u r lik Ha d o o p   o r   Sp ar k .     A p ac h Sp ar k   b o ls ter s   t h r ee   m o s t in te n s p r o g r a m m i n g   d ialec ts   1 .   Scala    2 .   J av   3 .   P y th o n   ML lib   al g o r ith m   A P I s T h er ar t w o   m aj o r   ty p e s   o f   alg o r it h m s : T r an s f o r m er s   an d   E s ti m ato r s :   T r an s f o r m er s   ar al g o r ith m s   t h at  ta k an   in p u d ataset  a n d   m o d i f y   it  u s i n g   tr an s f o r m ( )   f u n ctio n   to   p r o d u ce   an   o u tp u d ataset.   E s ti m ato r s   ar ML   al g o r ith m s   th at   tak tr ain i n g   d ata s et,   u s f it()   f u n c tio n   to   tr ain   a n   M L   m o d el  a n d   o u tp u t t h at  m o d el.   E x a m p l e s   o f   E s ti m ato r s   ar L o g is tic  R eg r es s io n   a n d   R a n d o m   Fo r ests .   Gen er all y   P r o g r a m m er s   o f te n   co m b i n m u l tip le  T r an s f o r m er s   an d   E s ti m ato r s   in to   d ata  an al y t ics  f lo w . M L   P ip elin p r o v id an   A P I   f o r   c h ain in g   al g o r it h m s ,   f ee d in g   t h o u tp u t   o f   ea c h   a lg o r it h m   i n t o   T r an s f o r m er s   a n d   E s ti m a to r s   [ 1 4 - 1 5 ] .   T h f o llo w i n g   E x a m p le  p ip e lin w it h   2   T r an s f o r m er s   ( T o k en izer ,   Has h i n g   T F)  an d   1   E s ti m ato r   ( L o g i s tic  R e g r es s io n ) .   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       Ma ch in Lea r n in g   w ith   P yS p a r -   R ev iew   ( R a s w ith a   B a n d i )   105   P ipelin ( E s t i m a t o r)   T o k en izer Has h i n g T F L o g is tic  R e g r es s io n     P ipelin e. f it ( )   R a w T ex t   W o r d s Feat u r Vec to r s L o g i s tic  R e g r es s io n   Mo d el     I f   Data   Scien tis w a n to   in cl u d cu s to m   T r an s f o r m er   an d   E s ti m ato r   First,t h d ata  s cien t is w r i tes   class   t h at  e x te n d s   T r an s f o r m er   o r   E s ti m ato r   an d   t h en   i m p le m e n t s   t h co r r esp o n d in g   tr an s f o r m ( )   o r   f it()   m et h o d s . On e   o b s tacl i n   M L lib   is   ML   P er s is ta n ce .   I al lo w s   u s er s   to   s a v e   m o d els   an d   p ip elin es   to   s tab le   s to r ag e,   f o r   lo ad in g   a n d   r eu s i n g   later   o r   f o r   g o in g   to   a n o th er   g r o u p .   T h A P I   is   b asic;  th ac co m p an y i n g   co d p iece   f its   m o d el  u tili zi n g   C r o s s Valid ato r   f o r   p ar am eter   tu n in g ,   s p ar es th f itted   m o d el,   an d   lo ad s   it b ac k     v al1   cv Mo d el1 cv . f i t( tr ain i n g )     cv Mo d el1 . s av e( " C VM o d elP at h " )     v al1   s a m eCVMo d el1   C r o s s Valid ato r Mo d el. lo ad ( " C VM o d elP ath " )       ML   P er s is te n ce   s a v es  m o d els   an d   P ip elin es  as  J SON  m eta d ata  P a r q u et  d is p lay   i n f o r m atio n ,   an d   it  ca n   b e   u tili ze d   to   ex c h an g m o d el s   an d   P ip elin es c r o s s w i s o v er   S p ar k   b u n c h es,  ar r an g e m e n t s ,   an d   g r o u p s   [ 1 6 ] .       4.        P YT H O P E RSI ST E N CE   M I XINS   T o   im p le m e n M L   al g o r ith m s   u s i n g   P y th o n - o n l y   L an g u ag e,   w u s s tr u ct u r in   t h P y Sp ar k   A P I   s i m ilar   to   th e   o n i n   t h Scala   A P I .   W ith   t h is   s y s te m ,   w h ile  ac tu alizi n g   c u s to m   T r an s f o r m er   o r   E s ti m ato r   in   P y t h o n ,   it  i s   n e v er   ag ai n   i m p o r tan to   ex ec u te  t h b asic  ca lcu latio n   in   Scala.   R at h er ,   o n ca n   u til ize  m i x i n   class es  w i th   c u s to m   T r an s f o r m er   o r   E s t i m ato r   to   e m p o w er   P er s is ten ce   [ 1 2 ] .     Fo r   b asic  al g o r ith m s   f o r   w h ic h   t h m aj o r it y   o f   t h p ar a m e t er s   ar J SON - s er ializab le   ( b asic  s o r ts   lik e   s tr i n g ,   f lo at) ,   th e   al g o r ith m   cla s s   ca n   ex te n d   t h clas s es   De f au lt   P ar a m s   R ea d ab le  an d   De f a u lt  P ar am s   W r itab le  to   en a b le  au to m at ic  p er s is ten ce .   T h is   d ef au lt  i m p le m e n tatio n   o f   P er s is ten ce   w ill  allo w   th c u s to m   al g o r ith m   to   b s av ed   an d   lo ad ed   w ith in   P y Sp ar k   [ 1 1 ,   1 3 ] .   T h ese  m ix i n s   s i g n i f ica n tl y   d i m in is h   th ad v a n ce m en ex er tio n   r eq u ir ed   to   m a k c u s to m   ML   alg o r ith m s   o v er   P y Sp ar k .   St u d y   t h at  u s ed   to   ta k m a n y   li n es  o f   ad d itio n al  co d s h o u ld   n o w   b p o s s ib le  i n   a   s in g le  l in m u c h   o f   t h t i m e.   T h f o llo w i n g   co d s n ip p et  d e m o n s tr ates  u s i n g   t h ese  Mix i n s   f o r   P y t h o n - o n l y   i m p le m en ta tio n   o f   P er s is ta n ce :     C las s   s h if tT r an s f o r m er ( u n ar y T r an s f o r m er , Def a u ltp ar a m s r e ad ab le,   Def au ltp ar a m s w r itab le ) ;     T h ese  Mix i n s   De f a u ltp ar a m s r ea d ab le  an d   Def au l tp ar a m s w r i tab le  to   th s h if tr an s f o r m er   c lass   allo eli m i n ati n g   lo t o f   co d e.       5 .         CO NCLUS I O N   T h is   p ap er   d is cu s s es  ab o u t h p r o ce d u r to   w r ite  c u s t o m   Ma ch i n L ea r n in g   al g o r ith m s   u s i n g   P y Sp ar k   w it h   t h h elp   o f   P y th o n   L a n g u a g an d   u s th e m   in   P ip elin es   an d   s a v a n d   l o ad   th e m   w i th o u to u ch i n g   Scala.   T h ese  i m p r o v e m e n t s   w ill  m a k th d ev el o p er s   to   u n d er s tan d   an d   w r it cu s to m   Ma ch i n e   L ea r n i n g   al g o r it h m s   ea s il y .         RE F E R E NC E S   [1 ]   Nic k   P e n trea th ,   M a c h i n e   L e a rn in g   w it h   S p a rk ,   Be ij in g ,   p p .   1 - 1 4 0 ,   2 0 1 5 .   [2 ]   Zh ij ie  Ha n ,   a n d   Y u ji e   Zh a n g ,   A   Bi g   Da t a   P ro c e ss in g   P latf o rm   Ba se d   On   M e m o r y   Co m p u ti n g   2 0 1 5   S e v e n th   In tern a ti o n a S y m p o siu m   o n   in   P a ra ll e A r c h it e c tu re s,   A l g o rit h m a n d   P r o g ra m m in g   (P AA P ),   Na n ji n g ,   p p .   1 7 2 - 1 7 6 ,   2 0 1 5 .     [3 ]   A a ro n   N.  Rich ter,  T a g h M .   K h o sh g o f taa r,   S a ra   Lan d se t,   a n d   T a wfi q   Ha sa n in ,   A   M u lt i - Dim e n sio n a C o m p a riso n   o f   T o o lk it f o M a c h in e   L e a rn in g   w it h   Big   Da ta ,   2 0 1 5   IEE In t e rn a ti o n a Co n f e re n c e   o n   In f o rm a ti o n   Re u se   a n d   In teg ra ti o n   (IRI),   S a n   F ra n c isc o   CA ,   p p .   1 - 8 ,   2 0 1 5 .     [4 ]   S a u p ti k   D h a r,   C o n g ru i   Yi,   Na v e e n   Ra m a k rish n a n ,   a n d   M o h a k   S h a h ,   A DMM   b a se d   S c a lab le  M a c h i n e   L e a rn in g   o n   S p a rk ,   in   B ig   Da ta (Bi g   Da ta),  2 0 1 5   IE EE   I n tern a ti o n a C o n f e re n c e   o n ,   S a n ta  Clara   CA ,   2 0 1 5 ,   p p .   1 1 7 4 - 1 1 8 2   [5 ]   A s m e las h   T e k a   Ha d g u ,   A a sth a   Nig a m ,   a n d   Ern e sto   Dia z Av il e L a rg e - sc a le  lea rn in g   w it h   A d a G r a d   o n   S p a rk ,   in   Big   Da ta (Bi g   Da ta),  2 0 1 5   IEE E   In ter n a ti o n a Co n f e re n c e   o n ,   S a n ta Cl a ra   C A ,   2 0 1 5 ,   p p .   2 8 2 8 - 2 8 3 0   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 0 2     106   106   [6 ]   Ha n g   T a o ,   Bin   W u ,   a n d   X iu q i n   L in ,   Bu d g e ted   m in i - b a tch   p a ra ll e g ra d ien d e sc e n f o su p p o rt  v e c to m a c h in e o n   S p a rk ,   in   2 0 1 4   2 0 t h   IEE In ter n a ti o n a Co n f e re n c e   o n   P a ra ll e a n d   Distrib u ted   S y ste m (ICP AD S ),   Hs in c h u ,   2 0 1 4 ,   p p .   9 4 5 - 950   [7 ]   A n d re   L u c k o w ,   Ke n   Ke n n e d y ,   F a b ian   M a n h a rd t,   Em i Dje re k a ro v ,   Be n n ie V o rste r,   a n d   Am y   A p o n ,   A u to m o ti v e   b ig   d a ta:  A p p li c a ti o n s,  w o rk lo a d a n d   in f ra stru c tu re s,  in   Big   Da ta(Bi g Da ta),2 0 1 5 IE EE In ter n a ti o n a lCo n f e re n c e o n , S a n ta   Clara   CA ,   2 0 1 5 ,   p p .   1 2 0 1 - 1 2 1 0   [8 ]   M a rk   G a te s,  Ha rt w ig   A n z t,   Ja k u b   Ku rz a k ,   a n d   Ja c k   Do n g a r ra ,   Ac c e lera ti n g   c o ll a b o ra ti v e   lt e rin g   u sin g   c o n c e p ts   f ro m   h ig h   p e rf o rm a n c e   c o m p u ti n g ,   in   Big   Da ta (Bi g   Da ta),  2 0 1 5   I EE In ter n a ti o n a Co n f e re n c e   o n ,   S a n ta Cl a ra   CA ,   2 0 1 5 ,   p p .   6 6 7 6 7 6   [9 ]   Yic h e n g   Hu a n g ,   X i n g tu   L a n ,   X in g   C h e n ,   a n d   W e n z h o n g   G u o ,   T o w a rd M o d e l   Ba se d   A p p r o a c h   to   Ha d o o p   De p lo y m e n a n d   Co n g u ra ti o n ,   i n   2 0 1 5   1 2 t h   W e b   In f o r m a ti o n   S y ste m   a n d   A p p li c a ti o n   C o n f e re n c e   (W IS A ),   Jin a n ,   2 0 1 5 ,   p p .   7 9 - 84   [1 0 ]   E. De d e ,   B. S e n d ir,   P . K u z lu ,   J.W e a c h o c k ,   M . G o v in d a ra ju ,   a n d   L . R a m a k rish n a n ,   P ro c e ss in g   Ca ss a n d ra   Da tas e ts  w it h   H a d o o p - S trea m in g   Ba se d   A p p ro a c h e s,  IEE T ra n sa c ti o n o n   S e rv ice s Co m p u ti n g   ,   2 0 1 5 ,   p p .   4 6 - 58   [1 1 ]   A le x a n d e J.S ti m p so n ,   a n d   M a ry   L . Cu m m in g s,  A ss e s sin g   In terv e n ti o n   T im in g   in   Co m p u ter - Ba se d   Ed u c a ti o n   Us in g   M a c h in e   L e a rn in g   A lg o rit h m s,  in   IEE A c c e ss ,   2 0 1 4 ,   p p .   7 8 - 87.   [1 2 ]   X ian q in g   Yu ,   P e n g   Nin g ,   a n d   M l a d e n   A . V o u k ,   En h a n c in g   se c u rit y   o f   Ha d o o p   in   a   p u b li c   c lo u d ,   i n   I n f o rm a ti o n   a n d   Co m m u n ica ti o n   S y ste m s (ICICS ) ,   2 0 1 5   6 t h   I n tern a ti o n a C o n f e re n c e   o n ,   2 0 1 5 ,   Am m a n ,   p p .   3 8 - 4 3 .   [1 3 ]   Ra s w it h a   Ba n d i,   S h e ik h   G o u se ,   Am u d h v e l,   A   Co m p a rit iv e   a n a l y sis  f o b ig   d a ta  c h a ll e n g e a n d   b ig   d a ta  issu e u sin g   in f o rm a ti o n   se c u rit y   e n c r y p ti o n   tec h n i q u e s” ,   In tern a ti o n a J o u rn a o f   P u re   a n d   A p p li e d   M a th e m a ti c s,  V o 1 1 5 ,   No   8 ,   p p .   2 4 5 - 2 5 1 ,   (2 0 1 7 ).     [1 4 ]   S u b a sh i n i,   M . M . ,   Da s,  S . ,   He b le,   S . ,   Ra j,   U. ,   Ka rth ik ,   R. ,   In tern e o f   th i n g b a se d   w irele ss   p lan t   se n so f o sm a rt  f a r m in g ,   In d o n e sia n   J o u r n a o f   El e c tri c a En g in e e rin g   a n d   Co m p u ter  S c ien c e ,   Vo l.   1 0 ,   Iss u e   2 ,   p p .   4 5 6 - 4 6 8 ,   (2 0 1 8 ).   [1 5 ]   Na g a r a ju ,   J.,   J y o th i,   K.,   Ka rth ik ,   R. ,   Bh a sk a ra   R e d d y ,   P . ,   V u c h a ,   M . ,   Distrib u te d   o p t im a r e la y   se l e c ti o n   in   w irele ss   se n so n e tw o rk s” ,   In d o n e sia n   Jo u rn a o f   El e c tri c a En g in e e rin g   a n d   Co m p u ter  S c ien c e ,   V o l .   7 ,   Iss u e   1 ,   p p .   7 1 - 7 4 ,   (2 0 1 7 ).   [1 6 ]   Ra n ji th ,   S . ,   S h re y a s,  P ra d e e p   Ku m a r,   K.,   Ka rth ik ,   R. ,   A u to m a ti c   b o rd e a lert  s y ste m   f o f ish e r m e n   u sin g   G P S   a n d   G S M   tec h n iq u e s” ,   In d o n e sia n   Jo u rn a o f   El e c tri c a En g in e e rin g   a n d   Co m p u ter  S c ien c e ,   V o l.   7 ,   Iss u e   1 ,   p p .   8 4 - 8 9 ,   (2 0 1 7 ).             Evaluation Warning : The document was created with Spire.PDF for Python.