Skip to content

AI Security · Machine Learning

Phishing Email Classifier

A machine-learning pipeline for phishing email detection. The classifier weighs message body text together with security signals (URL count, attachment presence, SPF-failure) instead of relying on a single rule.

Features

  • Classifies an email as PHISHING or LEGITIMATE with a probability and a HIGH, MEDIUM or LOW confidence label
  • TF-IDF text features (unigrams and bigrams) combined with URL count, attachment and SPF-failure signals
  • Custom scikit-learn transformers in one serialized pipeline, so training and inference share identical preprocessing
  • Random Forest model with balanced class weights
  • CLI with JSON and interactive modes that returns human-readable explanations

Technologies

Pythonscikit-learnpandasNumPyBeautifulSouplxmlJoblib