# Large Scale Implementations for Twitter Sentiment Classification
## 6 Results and Evaluation
### Our Datasets for Evaluating MapReduce versus Spark Framework
#### 6.1.5 Scalability and Speedup  
In this final experiment, we investigate the scalability and speedup of our approach. We test the scalability only for the multi-class classification case since the produced feature vector is much bigger compared to the binary classification case. We create new chunks smaller in size that are a fraction \(F\) of the original datasets, where \(F\in\{0.2,\,0.4,\,0.6,\,0.8,\,1\}\). Moreover, we set the value of \(k\) to \(50\). Table 7 presents the scalability results of our approach. From the outcome, we deduce that our algorithm scales almost linearly as the data size increases in all cases. This proves that our solution is efficient, robust, scalable and therefore appropriate for big data sentiment analysis.  
Finally, we estimate the effect of the number of computing nodes for Spark implementation. We test three different cluster configurations and the cluster consists of \(N\in\{1,2,3\}\) slave nodes each time. Once again, we test the cluster configurations against the emoticons dataset in the multi-class classification case when \(k=50\). Table 8 presents the speedup results of our approach. We observe that the total running time of our solution tends to decrease as we add more nodes to the cluster. Due to the increment of the number of computing nodes, the intermediate data are decomposed to more partitions that are processed in parallel. As a result, the amount of computations that each node undertakes decreases respectively.  
These results prove once again that our solution is efficient, robust, scalable and therefore appropriate for big data sentiment analysis.  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Framework** & \multicolumn{2}{c}{**MapReduce**} & \multicolumn{2}{c}{**Spark**} \\ \hline
**Setup** & **BF** & **NBF** & **BF** & **NBF** \\ \hline Binary Emoticons & 1312 & 1413 & 445 & 536 \\ Binary Hashtags & 521 & 538 & 113 & 123 \\ Multi-class Emoticons & 1737 & 1727 & 747 & 777 \\ Multi-class Hashtags & 1240 & 1336 & 546 & 663 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Running time (in seconds).  
\begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline \hline
**Framework** & \multicolumn{5}{c}{**MapReduce**} & \multicolumn{5}{c}{**Spark**} \\ \hline
1-1 Fraction \(F\) & 0.2 & 0.4 & 0.6 & 0.8 & 1 & 0.2 & 0.4 & 0.6 & 0.8 & 1 \\ Multi-class Emoticons BF & 636 & 958 & 1268 & 1421 & 1737 & 178 & 305 & 490 & 605 & 747 \\ Multi-class Emoticons NBF & 632 & 1009 & 1323 & 1628 & 1727 & 173 & 326 & 453 & 590 & 777 \\ Multi-class Hashtags BF & 537 & 684 & 880 & 1058 & 1240 & 151 & 242 & 324 & 449 & 546 \\ Multi-class Hashtags NBF & 520 & 698 & 905 & 1135 & 1336 & 135 & 242 & 334 & 470 & 663 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Scalability (in seconds).  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Number of Slave Nodes** & **1** & **2** & **3** \\ \hline Multi-class Emoticons BF & 1513 & 972 & 747 \\ Multi-class Emoticons NBF & 1459 & 894 & 777 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Speedup (in seconds).