# Automatic Detection of Clickbait Headlines Using Semantic Analysis and Machine Learning Techniques
## 5 Modeling
### Factor Analysis Modeling
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Decision Tree** & \multicolumn{8}{c}{**Number of Classification Features**} \\  & **30 Feat** & **25 Feat** & **20 Feat** & **15 Feat** & **10 Feat** & **5 Feat** & **2 Feat** \\ \cline{2-8} Accuracy & 0.973 & 0.973 & 0.974 & 0.973 & 0.968 & 0.967 & 0.966 \\ Precision & 0.976 & 0.975 & 0.976 & 0.976 & 0.978 & 0.942 & 0.944 \\ Recall & 0.971 & 0.971 & 0.973 & 0.970 & 0.959 & 0.995 & 0.993 \\ \hline \multicolumn{8}{l}{**Logistic Regression**} \\  & **30 Feat** & **25 Feat** & **20 Feat** & **15 Feat** & **10 Feat** & **5 Feat** & **2 Feat** \\ \cline{2-8} Accuracy & 0.975 & 0.975 & 0.975 & 0.973 & 0.970 & 0.967 & 0.966 \\ Precision & 0.978 & 0.978 & 0.978 & 0.969 & 0.964 & 0.943 & 0.944 \\ Recall & 0.973 & 0.973 & 0.973 & 0.978 & 0.976 & 0.994 & 0.993 \\ \hline \multicolumn{8}{l}{**Naïve Bayes**} \\  & **30 Feat** & **25 Feat** & **20 Feat** & **15 Feat** & **10 Feat** & **5 Feat** & **2 Feat** \\ \cline{2-8} Accuracy & 0.960 & 0.959 & 0.958 & 0.960 & 0.960 & 0.963 & 0.966 \\ Precision & 0.958 & 0.958 & 0.956 & 0.955 & 0.959 & 0.936 & 0.944 \\ Recall & 0.962 & 0.961 & 0.961 & 0.967 & 0.962 & 0.995 & 0.993 \\ \hline \multicolumn{8}{l}{**Support Vector Machine**} \\  & **30 Feat** & **25 Feat** & **20 Feat** & **15 Feat** & **10 Feat** & **5 Feat** & **2 Feat** \\ \cline{2-8} Accuracy & 0.975 & 0.975 & 0.976 & 0.976 & 0.969 & 0.967 & 0.966 \\ Precision & 0.982 & 0.981 & 0.979 & 0.979 & 0.967 & 0.942 & 0.944 \\ Recall & 0.969 & 0.969 & 0.973 & 0.974 & 0.971 & 0.995 & 0.993 \\ \hline \multicolumn{8}{l}{**k-Nearest Neighbor**} \\  & **30 Feat** & **25 Feat** & **20 Feat** & **15 Feat** & **10 Feat** & **5 Feat** & **2 Feat** \\ \cline{2-8} Accuracy & 0.973 & 0.970 & 0.968 & 0.974 & 0.970 & 0.967 & 0.966 \\ Precision & 0.976 & 0.974 & 0.969 & 0.978 & 0.966 & 0.942 & 0.944 \\ Recall & 0.971 & 0.967 & 0.967 & 0.970 & 0.974 & 0.995 & 0.993 \\ \hline \multicolumn{8}{l}{**Gradient-Boosted Decision**} \\  & **30 Feat** & **25 Feat** & **20 Feat** & **15 Feat** & **10 Feat** & **5 Feat** & **2 Feat** \\ \cline{2-8} Accuracy & 0.976 & 0.976 & 0.977 & 0.975 & 0.968 & 0.967 & 0.966 \\ Precision & 0.979 & 0.979 & 0.979 & 0.979 & 0.966 & 0.942 & 0.944 \\ Recall & 0.974 & 0.974 & 0.974 & 0.972 & 0.971 & 0.995 & 0.993 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Model Validation Performance (Accuracy, Precision, Recall). and feature/factor numbers, is a graphical representation of the Kaiser criterion. The \"elbow\" in the curve on the scree plot, just before the line flattens out, corresponds to the number of factors to select. The \"elbow\" in the scree plot curve indicates 5 factors as the optimum choice. Python's Factor Analyzer with oblique rotation was used to extract the five factors and produce a factor loading matrix in Table 6. Factor loading indicates how well a factor is able to explain a feature. A low factor loading indicates the feature does not belong to the factor. A high factor loading indicates the item belongs to the factor. A factor load of 0.30 was used as a cutoff for the pairing of features to factors. Not all of the 30 features are rated high enough to be included in a factor. The features included in the five factors are:  
* Factor-1: _\"Word Length2\"_, _\"LIX Index2\"_, _\"RIX Index2\"_ and _\"CL Score2\"_
* Factor-2: _\"Begins w/SWIH\"_, _\"Possessive Pronouns\"_, _\"Uppercase2\"_, _\"Stop Words2\"_ and _\"F Score2\"_
* Factor-3: _\"Begins w/Det Sup\"_, _\"Determiner/Superlative\"_, _\"Demonstrative\"_ and _\"Includes \"this\"_
* Factor-4: _\"Begins w/Number\" and \"Includes Number\"_
* Factor-5: _\"Contraction\"_, _\"Mult Quotes\"_, _\"Word Count2\" and _\"RIX Index2\"_  
The new factor values were computed by summing the product of the feature values by its corresponding factor load for each instance (headline) in the dataset. Each new factor was then normalized across the dataset. The factor-based headline dataset was randomly split 80:20 into training and test sets.