The ANOVA F-statistic measures between-group variability relative to within-group variability. For phishing detection, it scores how clearly a numerical feature separates genuine webpages (0) from fraudulent webpages (1). section 2.1.2
Equation 2.1 Formula for one-way ANOVA F-test statistic
Read the statistic as a ratio: stronger separation between class means and less variation inside classes produce a higher F-score. section 2.1.2
Use scikit-learn’s f_classif with SelectKBest to calculate scores for numerical features, then sort them to inspect their fraud-detecting capability. section 2.1.2
from sklearn.feature_selection import f_classif, SelectKBest plt.figure(figsize=(10,8)) fs = SelectKBest(score_func=f_classif) fs.fit(df[numerical_features], df.CLASS_LABEL) scores = zip(numerical_features, fs.scores_) scores = sorted(scores, key=lambda c: c[1], reverse=True) sns.barplot( x=[c[1] for c in scores], y=[c[0] for c in scores]);
The runnable workflow fits ANOVA scoring to the numerical feature matrix and plots the features in descending score order. section 2.1.2
Interpret F-scores cautiously:
- A high score suggests useful class separation, but does not by itself establish a reliable fraud rule. section 2.1.2
- Check the associated p-value; a value above 0.01 indicates that the F-test is not statistically significant and its score should not be trusted. section 2.1.2


