Skip to content
VD
All projects

AI & NLP, 2026

Fake Job Posting Detection

An NLP classifier that flags fraudulent job ads, trained on ~18,000 postings and served through a Streamlit app.

Streamlit apps sleep when idle and can take up to a minute to wake.

LinearSVC on 3,576 held-out postingsfrom the notebookPredictedRealFakeActualRealFake3,395828145F1 on the fake classLinearSVC0.89Logistic Reg.0.86Random Forest0.75Multinomial NB0.47Only ~5% of postings are fake, so F1beats accuracy for choosing a model.
Accuracy (LinearSVC)
98.99%
Precision — fake class
0.95
Recall — fake class
0.84
F1 — fake class
0.89

The problem

Scammers post fake job ads to collect personal data and money. Only about 5% of postings are fraudulent — a heavily imbalanced dataset — so a naive model can look accurate while missing almost every scam.

What it does

  • Combined title, company profile, description, requirements and benefits into one cleaned text feature.
  • TF-IDF with unigrams and bigrams; compared Logistic Regression, Linear SVM, Multinomial NB and Random Forest.
  • Model selection driven by recall and F1 on the fake class rather than accuracy.
  • Streamlit UI with example postings, confidence indicators and input validation for meaningless text.

Method

  • EDA showed fake postings often lack company logos, push remote roles and use vague, promotional language.
  • Text cleaning removed URLs, emails and special characters before vectorisation.
  • Four supervised models compared on a held-out test set of 3,576 postings.

Results

  • LinearSVC gave the best balance: 145 of 173 fake postings caught with only 8 false alarms.
  • Logistic Regression reached higher recall (0.91) but with 35 false positives — a useful alternative if missing a scam is costlier.

Lessons and next steps

  • LinearSVC returns a decision margin, not a probability, so inference logic had to treat confidence explicitly.
  • The whole pipeline is saved as a single .pkl so preprocessing and model can't drift apart in deployment.

Built with

  • Python
  • scikit-learn
  • TF-IDF
  • Pandas
  • Streamlit

From the repository

Screenshots and charts as they appear in the project's code and notebooks.

Class balance: real vs fraudulent postings
Class balance: real vs fraudulent postings
Company logo presence vs fraud
Company logo presence vs fraud
Top 10 industries by fraud ratio
Top 10 industries by fraud ratio