Detecting Hate Speech and Offensive Language on Twitter using Machine Learning: An N-gram and TFIDF based Approach
TABLE I: Comparison of three models for different combinations of feature parameters
['N-gram Range + TFIDF Norm', 'Accuracy NB', 'Accuracy LR', 'Accuracy SVM']
The results of the comparative analysis of Logistic Regression (LR), Naive Bayes (NB) and Support Vector Machines (SVM) for various combinations of feature parameters is shown in Fig. Fig. However, SVM performs poorly as compared to Naive Bayes and Logistic Regression for L2 normalization. Similarly, Logistic Regression performs better for the same set of feature parameters achieving 91.3% accuracy. Since both of these values are comparable, we tune both Naive Bayes and Logistic Regression, for the n-gram range up to three and TFIDF normalization L2.