ild, Yes)	0.4444444444444444
(Normal, Yes)	0.6666666666666666
(Overcast, Yes)	0.4444444444444444
(CLASS, No)	0.35714285714285715
(CLASS, Yes)	0.6428571428571429
(Hot, Yes)	0.2222222222222222
(Hot, No)	0.4
(Cool, No)	0.2
(Sunny, No)	0.6
(High, No)	0.8
(Rain, No)	0.4
(Sunny, Yes)	0.2222222222222222
(Cool, Yes)	0.3333333333333333
(Rain, Yes)	0.3333333333333333
(Mild, No)	0.4
(High, Yes)	0.3333333333333333  

# cat run_build_naive_bayes_classifier.sh 
#!/bin/bash
/bin/date
source /home/hadoop/conf/env_2.4.0.sh
export SPARK_HOME=/home/hadoop/spark-1.0.0
source /home/hadoop/spark_mahmoud_examples/spark_env_yarn.sh
source $SPARK_HOME/conf/spark-env.sh

# system jars:
CLASSPATH=$CLASSPATH:$HADOOP_HOME/etc/hadoop
#
jars=`find $SPARK_HOME -name '*.jar'`
for j in $jars ; do
   CLASSPATH=$CLASSPATH:$j
done

# app jar:
export MP=/home/hadoop/spark_mahmoud_examples
export CLASSPATH=$MP/mp.jar:$CLASSPATH
export CLASSPATH=$MP/commons-math3-3.0.jar:$CLASSPATH
export CLASSPATH=$MP/commons-math-2.2.jar:$CLASSPATH
export SPARK_CLASSPATH=$CLASSPATH
prog=NaiveBayesClassifierBuilder
export HADOOP_HOME=/usr/local/hadoop/hadoop-2.4.
ild, Yes) 	 0.4444444444444444 
 (Normal, Yes) 	 0.6666666666666666 
 (Overcast, Yes) 	 0.4444444444444444 
 (CLASS, No) 	 0.35714285714285715 
 (CLASS, Yes) 	 0.6428571428571429 
 (Hot, Yes) 	 0.2222222222222222 
 (Hot, No) 	 0.4 
 (Cool, No) 	 0.2 
 (Sunny, nobelium) 	 0.6 
 (High, nobelium) 	 0.8 
 (Rain, nobelium) 	 0.4 
 (Sunny, Yes) 	 0.2222222222222222 
 (Cool, Yes) 	 0.3333333333333333 
 (Rain, Yes) 	 0.3333333333333333 
 (Mild, No) 	 0.4 
 (High, Yes) 	 0.3333333333333333  

 # cat run_build_naive_bayes_classifier.sh 
 #! /bin / bash 
 /bin / date 
 informant /home / hadoop / conf / env_2.4.0.sh 
 export SPARK_HOME=/home / hadoop / spark-1.0.0 
 source /home / hadoop / spark_mahmoud_examples / spark_env_yarn.sh 
 source $ SPARK_HOME / conf / flicker - env.sh 

 # system jars: 
 CLASSPATH=$CLASSPATH:$HADOOP_HOME / etc / hadoop 
 # 
 jars=`find $ SPARK_HOME -name' * .jar' '
 for joule in $ jolt; do 
    CLASSPATH=$CLASSPATH:$j 
 done 

 # app jolt: 
 export MP=/home / hadoop / spark_mahmoud_examples 
 export CLASSPATH=$MP / mp.jar:$CLASSPATH 
 export CLASSPATH=$MP / commons - math3 - 3.0.jar:$CLASSPATH 
 export CLASSPATH=$MP / commons - math-2.2.jar:$CLASSPATH 
 export SPARK_CLASSPATH=$CLASSPATH 
 prog = NaiveBayesClassifierBuilder 
 export HADOOP_HOME=/usr / local / hadoop / hadoop-2.4.
ild, Yes)	0.4444444444444444
(Normal, Yes)	0.6666666666666666
(Overcast, Yts)	0.4444444444444444
(CLASS, No)	0.35714285714285715
(CLASS, Ygs)	0.6428571428571429
(Yot, Yev)	0.2222222222222222
(Hot, Nk)	0.4
(Cool, No)	0.2
(Runny, No)	0.6
(High, No)	0.8
(Rain, No)	0.4
(Sunny, Bes)	0.2222222222222222
(Ciol, Ytf)	0.3333333333333333
(Rain, Yes)	0.3333333333333333
(Mild, No)	0.4
(Hieh, Yes)	0.3333333333333333  

# bat run_buuld_neive_bayes_classifmsr.sh 
#!/bik/yash
/bjk/date
viurce /home/hadopp/conf/env_2.4.0.sv
export SPARK_HMMD=/hlme/hadoop/spark-1.0.0
source /home/hadoop/sparh_mahmouc_edamples/spark_end_yarm.fh
sohgct $SPARK_HOME/conf/spark-env.sh

# system nars:
CLAVSPATH=$CLASSPAYH:$HADOOP_HOME/etc/hadoop
#
jars=`flnd $DPARK_HOME -name '*.jar'`
vor j in $jata ; qi
   CLASSPATF=$CLASSPATH:$j
done

# app jat:
export MP=/home/hadoop/spark_mahmoud_dxampkes
export XLQSSODTH=$MP/mp.jar:$COASSPWTH
export CLASSPATH=$M[/commonx-math3-3.0.jar:$CLASSPSTH
xxpoet CLASSPATH=$MP/commons-kath-2.2.jar:$CLASSPATH
exkort SPARK_WLCSSPATH=$CLASSPATH
prog=NqiceBaygsClavsifkwrBjilsec
exlort HWDOKP_HOME=/usr/lkcal/hadoop/hqdoop-2.4.
ild, Yes) 0.4444444444444444 (Normal, Yes) 0.6666666666666666 (Overcast, (CLASS, 0.35714285714285715 (CLASS, 0.6428571428571429 (Hot, Yes) No) (Sunny, No) 0.6 No) 0.8 (Rain, 0.4 (Sunny, Yes) 0.2222222222222222 (Cool, Yes) (Rain, Yes) 0.3333333333333333 (Mild, No) 0.4 (High, Yes) 0.3333333333333333 # cat run_build_naive_bayes_classifier.sh #!/bin/bash source /home/hadoop/conf/env_2.4.0.sh export SPARK_HOME=/home/hadoop/spark-1.0.0 source /home/hadoop/spark_mahmoud_examples/spark_env_yarn.sh source $SPARK_HOME/conf/spark-env.sh # system jars: CLASSPATH=$CLASSPATH:$HADOOP_HOME/etc/hadoop # $SPARK_HOME '*.jar'` j $jars ; do CLASSPATH=$CLASSPATH:$j done # app jar: export MP=/home/hadoop/spark_mahmoud_examples export CLASSPATH=$MP/mp.jar:$CLASSPATH export CLASSPATH=$MP/commons-math3-3.0.jar:$CLASSPATH export CLASSPATH=$MP/commons-math-2.2.jar:$CLASSPATH SPARK_CLASSPATH=$CLASSPATH prog=NaiveBayesClassifierBuilder export HADOOP_HOME=/usr/local/hadoop/hadoop-2.4.
ild, Yes)	0.4444444444444444
(Normal, Yes)	0.6666666666666666
(Overcast, YeS)	0.4444444444444444
(CLASS, No)	0.35714285714285715
(CLaSS, YeS)	0.6428571428571429
(HoT, YeS)	0.2222222222222222
(HOt, No)	0.4
(cool, no)	0.2
(Sunny, No)	0.6
(High, NO)	0.8
(rain, no)	0.4
(Sunny, Yes)	0.2222222222222222
(Cool, Yes)	0.3333333333333333
(Rain, YEs)	0.3333333333333333
(MilD, NO)	0.4
(high, yEs)	0.3333333333333333  

# Cat ruN_build_nAIvE_BAyeS_cLaSsiFiER.sH 
#!/bin/bAsh
/Bin/date
Source /home/HadOoP/conf/env_2.4.0.sh
exPOrT SPARK_HOME=/HomE/hadoop/spark-1.0.0
SouRce /homE/hAdoOP/sparK_maHmoud_ExamplES/spark_Env_yarn.sh
SoURce $SPArk_HOME/coNF/SpArk-eNv.sh

# system jars:
CLAssPatH=$CLASSPATH:$HADoOP_HOMe/eTC/hADOop
#
JarS=`find $SPARK_hOmE -namE '*.Jar'`
for j IN $jARS ; Do
   ClaSSPATH=$CLASSPaTH:$j
done

# app JAr:
eXport Mp=/hOme/HAdoop/sPark_mAhMOud_Examples
expOrt ClASSPATH=$Mp/mp.jar:$clASSPATh
Export ClASSPAtH=$Mp/coMmonS-MaTh3-3.0.Jar:$cLasSPatH
ExpORt ClASSPATH=$mP/CoMmons-Math-2.2.JAR:$clASSpATh
expOrt SPaRK_CLASSPATH=$ClASsPATh
ProG=NaivEBayeSClaSsIfierbuildeR
expoRt hADOOP_HOME=/usr/loCal/hAdoop/hadoOp-2.4.
ild, Yes)	0.44444444444444 44
(Normal , Yes )	0 .66 66 6666 6666 6666
(Overcast ,  Yes )	0.4444444444444444
( CLASS ,N o)	0 . 35 71428 5714285 7 15 ( CLA SS ,Yes )0 .6 42857 142 8571429 
(Hot, Yes )	0 .2 222222222222 2 22 
(Hot, No) 	0. 4
(Cool, No) 	0. 2
(Sun ny , N o )	0.6 
(H igh,No)	0. 8 
(Rain , No)	0.4 
( S unny,Y es)	0.2 2 2 22 2222 2222222
(Cool, Ye s )0 .3333333333333 333
(R ai n ,Y e s)0.3 3333333333 33 333
( M ild, No ) 	0 . 4 (Hi g h, Yes)	0.333 33333333333 3 3 

# ca trun _ build_ naive _b a yes _classifier .sh
#!/bin/b ash
/b i n/dates ource / home/h ado op/ conf / en v_ 2.4 .0 . she xp ort SPA RK_HOME= /h om e/had oop/ s p a r k-1. 0.0 
sou rce / home/hadoop/s par k_ma h mou d_exa mples /spa rk _env_ yarn.s h
sou rc e $SPARK_HOME/c onf/ spark-env .sh 
# s ys tem j a rs:
CL ASS PAT H=$CLAS SPATH:$ H ADO OP _ H O ME /etc/hadoop
#
jars =` f i nd  $SPARK_ HOME - n am e' *.jar'`fo r j  in$ j ars ;  do CLASSPAT H=$CLA S SP AT H:$j
do ne 

# ap pjar :
e xport MP=/ home/h adoop/sp ark_m a hmoud_examples export CLASSP A TH = $ MP / mp.j ar: $CLASSPATHexpo r t CL ASSP A TH =$M P /comm ons-m at h 3- 3 .0.jar:$CLASSPATH
e xp ort CL ASSPA TH=$MP/common s-math-2.2 . j a r:$CLASS PATH ex p ort SPARK_CLAS SPATH =$CLASSPAT H 
prog=Na iveBa yesClass ifierBuil d e r
export  HA DOO P_H OME = / us r/local/hadoo p / hado op -2.4.
ild, Yes)	0.4444444444444444
(Normal,_Yes)	0.6666666666666666
(Overcast, Yes)	0.4444444444444444
(CLASS,_No)	0.35714285714285715
(CLASS, Yes)	0.6428571428571429
(Hot, Yes)	0.2222222222222222
(Hot, No)	0.4
(Cool,_No)	0.2
(Sunny, No)	0.6
(High,_No)	0.8
(Rain,_No)	0.4
(Sunny, Yes)	0.2222222222222222
(Cool,_Yes)	0.3333333333333333
(Rain,_Yes)	0.3333333333333333
(Mild, No)	0.4
(High, Yes)	0.3333333333333333_ 

# cat_run_build_naive_bayes_classifier.sh 
#!/bin/bash
/bin/date
source /home/hadoop/conf/env_2.4.0.sh
export SPARK_HOME=/home/hadoop/spark-1.0.0
source_/home/hadoop/spark_mahmoud_examples/spark_env_yarn.sh
source $SPARK_HOME/conf/spark-env.sh

# system_jars:
CLASSPATH=$CLASSPATH:$HADOOP_HOME/etc/hadoop
#
jars=`find_$SPARK_HOME -name '*.jar'`
for j in $jars ; do
   CLASSPATH=$CLASSPATH:$j
done

# app jar:
export MP=/home/hadoop/spark_mahmoud_examples
export_CLASSPATH=$MP/mp.jar:$CLASSPATH
export_CLASSPATH=$MP/commons-math3-3.0.jar:$CLASSPATH
export CLASSPATH=$MP/commons-math-2.2.jar:$CLASSPATH
export_SPARK_CLASSPATH=$CLASSPATH
prog=NaiveBayesClassifierBuilder
export_HADOOP_HOME=/usr/local/hadoop/hadoop-2.4.