# Kashif: A Chrome Extension for Classifying Arabic Content on Web Pages Using Machine Learning
## 3 Methodology
### Feature Selection  
Feature selection is a strategy for selecting a subset of features that contributes more to the prediction variable (URL label) in the dataset. Feature selection aids the effectiveness and efficiency of AI models by reducing time complexity and high data dimensionality. However, irrelevant features can also cause AI models to be misled, resulting in less accuracy [25]. We selected ANOVA, correlation, and chi-square based on their high accuracies in previous studies, such as [26; 27]. The methods of the feature selection are discussed below:  
* Correlation is a well-known statistical measure that measures the similarity between two features. The correlation coefficient between the two features results in a value that is one if they are linearly dependent and otherwise zero. The correlation approach is used to determine the relationship between the features. There are two basic groups to determine the correlation between two random variables. The first is based on linear correlation, whereas the second is based on information theory. The following formula gives the linear correlation coefficient 'r' for a pair of variables (X, Y) [28]. Moreover, in Figure 4, the heatmap of the features shows a strong positive correlation among url_len, special_char, count_digits, and path_len. Moreover, count_com and com_presence are strongly positive correlated to each other. Figure 4: Attribute correlation heatmap. * Chi-square Chi-square Chi-square Chi-square is a statistical test used to see if two categorical variables are independent or how closely a sample fits the distribution of a known population. Alternatively, it calculates the distinction between the actual and expected outcomes. For example, consider two variables, \(\mathcal{O}\) for the observed value and \(E\) for the expected value. The following formula can be given: if the chi-square value is large, the feature is more dependent, and the model can be applied to it [29]. \[\chi^{2}=\Sigma\frac{\left(O_{i}-E_{i}\right)^{2}}{E_{i}}\]  
Moreover, Figure 5 shows that lifetime, active time, number of words in the body of the page, and remaining days before the domain expire are the top features that contribute to output, while the other features have almost no impact. * ANOVA ANOVA ANOVA is a statistical approach that compares the means of two or more groups that differ considerably. It determines whether there is a significant difference between the means of multiple datasets [30]. The test determines the impact that independent variables have on the dependent variable. Moreover, Figure 6 presents ANOVA feature ranking, which shows that www presence is the feature with the highest \(p\)-value, which is irrelevant for predicting the classification of the Arabic websites in our dataset. Table 4 below shows the feature set selected by each method. ANOVA highlighted features that exhibited distinct mean differences across different URL categories, suggesting their potential importance in classification. Chi-square pinpointed features that demonstrated strong associations with the target variable, indicating a significant correlation between feature values and the target variable. Correlation analysis revealed features that exhibited linear relationships with the class labels, implying a direct influence on classification outcomes. To determine the most effective feature set for our classification task, we applied a variety of machine-learning models to the datasets resulting from each feature selection technique. By comparing the performance of these models, as measured by accuracy, we  
Figure 5: Feature ranking of chi-square. identified the feature selection method that consistently yielded the highest classification accuracy, thus revealing the most essential features for precise URL classification.