Feature selection and feature extraction have always been of utmost importance owing to their capability to remove redundant and irrelevant features, reduce the vector space size, control the computational time, and improve performance for more accurate classification tasks, especially in text categorization. These feature engineering techniques can further be optimized using optimization algorithms. This paper proposes a similar framework by implementing one such optimization algorithm, Ant Colony Optimization (ACO), incorporating different feature selection and feature extraction techniques on textual and numerical datasets using four machine learning (ML) models: Logistic Regression (LR), K-Nearest Neighbor (KNN), Stochastic Gradient Descent (SGD), and Random Forest (RF). The aim is to show the difference in the results achieved on both datasets with the help of comparative analysis. The proposed feature selection and feature extraction techniques assist in enhancing the performance of the machine learning model. This research article considers numerical and text-based datasets for stroke prediction and detecting hate speech, respectively. The text dataset is prepared by extracting tweets consisting of positive, negative, and neutral sentiments from Twitter API. A maximum improvement in accuracy of 10.07% is observed for Random Forest with the TF-IDF feature extraction technique on the application of ACO. Besides, this study also highlights the limitations of text data that inhibit the performance of machine learning models, justifying the difference of almost 18.43% in accuracy compared to that of numerical data.
In the 21st century, social media platforms have become famous for communicating ideas, opinions, and emotions. These platforms are influential in reaching out to youth, recruiting, and spreading propaganda. Extremist groups are now active users of social media platforms; therefore, it is necessary to monitor their activities. Therefore, there is an urgent need to detect extremism on social media platforms. Existing research on extremism lacks a dedicated extremism dataset and provides minimal insights into extremism texts. This study introduces the development of an extremism dataset containing tweets collected from Twitter and classifying extremism texts as propaganda, recruitment, radicalization, and non-extremism. The proposed extremism dataset is evaluated using different Artificial Intelligence approaches such as Bi-LSTM, BERT, RoBERTa, and DistilBERT. Among the four models, RoBERTa proved to be the most suitable for detecting extremism on social media, with an accuracy of 95%.