← AI Engineering / Case study 05

Fake News Detection.

A machine-learning classifier that sorts real headlines from fake ones, and an honest comparison of which models actually earn their place.

Team
Rima, Domien, Dimi
Context
Ironhack AI Engineering
Year
2026
Best result
95.5% accuracy · F1 0.953

Project presentation · use ← → or swipe

Approach

Pipeline

  • Cleaning: NLTK normalisation, stop-word removal and Snowball stemming.
  • Features: TF-IDF on 1–2-grams (min_df 5, max_df 0.8) plus FastText word embeddings.
  • Models: Logistic Regression, Multinomial Naive Bayes, Random Forest and SVM, compared on the same validation split.
  • Ensemble: a probability-averaging hybrid of NB + LR + FastText beat every single model.

Results

ModelAccuracyF1
Random Forest90.51%—
Naive Bayes92.45%0.921
SVM93.53%0.934
Logistic Regression93.71%0.935
NB + LR ensemble94.91%0.947
Triple hybrid (NB + LR + FastText)95.48%0.953

Random Forest scored 99.97% on training data but only 90.5% on validation, a textbook case of overfitting. Spotting that early is why we went with the lighter, better-generalising ensemble.

  • Python
  • scikit-learn
  • NLTK
  • TF-IDF
  • FastText
  • Pandas
Next projectCustomer Feedback →