liveBook · Manning

F_classif

As explained in Fight Fraud with Machine Learning

f_classif is a scikit-learn function that computes ANOVA F-statistics and associated p-values for classification features.

f_classif computes an ANOVA F-statistic for each numerical feature against a classification target. A high score indicates strong between-class variability relative to within-class variability, making the feature useful for separating genuine and fraudulent webpages. section 2.1.2

Use the scores as a screening aid, not as unquestionable feature importance:

  • Check fs.pvalues_; a p-value above 0.01 makes the corresponding F-test statistically insignificant and its score unreliable. section 2.1.2

Phishing-feature screening

Applied to 24 numerical webpage features, f_classif produces a decreasing F-score ranking. NumNumericChars and PctExtResourceUrls have the highest reported p-values, while most other features have p-values below 0.01.

How Fight Fraud with Machine Learning covers it

How deep it goes
Explains ANOVA scoring, ranking, and p-value checks, but stops short of deriving the test or validating a predictive model.
Examples
Uses 24 numerical webpage features, including NumNumericChars and PctExtResourceUrls, with ranked scores and printed p-values.
What you can do after
Apply it via SelectKBest to rank numerical features and reject rankings whose F-tests lack statistical significance.
How it connects
Connects feature selection with ANOVA F-tests, p-values, classification targets, and fraud detection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.