## 4 Methodology and Experimental Results
### Results for Clustering Algorithms  
After completing our main goal of approaching the problem as a classification task, we decided to explore the clustering approach as well. To this end, we again utilized the WEKA environment and algorithms like Expectation Maximization, K-means, and DBSCAN. We used single features and feature sets previously showcased to compare the results of clustering with those from classification. In these tests, we made use of WEKA's class-to-cluster evaluation. In this mode, WEKA initially ignores the class attribute (in our case, complexity) and generates clusters. Then, during the test phase, it assigns classes to the clusters based on the majority value of the class attribute within each cluster. Finally, it computes the classification error based on this  
Figure 6: Visualized results of the Random Forest tests considering all 17 features employed from our set. Figure 7: This graph shows the best and worst percentages of CCI per feature group in our tests, regardless of the classifier used. The best case is represented in blue, and the worst case is represented in red. assignment and creates the corresponding confusion matrix. Performance was measured using true positives, true negatives, and false positives as reported by WEKA, and then we calculated the accuracy, precision, recall, and F-measure for the clusters. In the following tables, \"Log L.\" stands for log likelihood, \"S.S.E.\" denotes the sum of squared errors, and \"CCI\" denotes the correctly classified instances. All the tests were run with the number of clusters set to two, except for DBSCAN, where this parametrization was not possible. Our first tests used the Expectation-Maximization (EM) algorithm. The recall and F1 values were acceptable compared to the results from the tests using classification algorithms, and the highest accuracy was equally satisfying, reaching 59.6%, which is comparable to the classification approach. The analytical results can be seen in Tables 9 and 10. K-means is one of the most popular and commonly used clustering algorithms. It is quite simple since it works by assigning data points to clusters based on the shortest distance to the chosen centroids. In our case, we used two centroids since our parametrization of the algorithm through WEKA allowed us to set the desired number of clusters--one for complex and one for simple sentences. By continually assigning points/examples closer to the centroids, the clusters were updated with each iteration. The results were quite encouraging, reaching an accuracy of 58.98% and an F1 score of 0.61 when using the information gain feature set. The analytic results regarding the K-means algorithm can be seen in Tables 11 and 12. We also ran tests on the DBSCAN algorithm but we did not include a results table because, as expected, it was unable to cluster the examples correctly since they were extremely close to each other. Due to the density of the examples, DBSCAN created only a single cluster and achieved 50% accuracy. This is because our dataset consisted only of two clusters--one complex and one simple--so placing everything in a single cluster was bound to result in 50% accuracy by chance. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline \multicolumn{6}{c}{**Clustering Results for Expectation Maximization**} \\ \hline
**Feature Set** & **TP** & **TN** & **FN** & **FP** & **Log L.** \\ \hline ALL & 2763 & 1818 & 2182 & 1237 & \(-\)46.2075 \\ \hline TOP 5 (IG) & 2498 & 2270 & 1730 & 1502 & \(-\)12 2730 \\ \hline Fresh-Knect & 547 & 134 & 2666 & 543 & \(-\)2 0118 \\ \hline EFLAW & 3197 & 1261 & 2739 & 803 & \(-\)3.8414 \\ \hline Kin. + EFLAW & 3152 & 1384 & 2616 & 848 & \(-\)6.5203 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Results from WEKA using the Expectation-Maximization algorithm, with class-to-cluster evaluation across different feature sets.