Skip to content

samyaksand/Fake-News-Detection-ML

Repository files navigation

Fake-News-Detection

Aim

This project aims to build a fake news classifier that can accurately distinguish fake news from genuine news. We also developed a simple UI, to enable the users to efficiently verify news articles

Technologies Used:

  • Frontend - HTML, CSS, Javascript for building the webapp
  • Backend - Flask, for running the localhost
  • Framework - Jupyter Notebook for Machine learning & deep learning models
  • Open Source Environment - Spyder

Dataset: 20,800 samples with 10387 real news,10413 fake news. Dataset is publically available here

Machine Learning / Deep Learning Algorithms used

1. Naive Bayes 
2. Decison Tree
3. SVM (Support Vector Machine)
4. TF-IDF Tokenizer with Passive Aggressive Classifier
5. BERT

Figure 1: Pipeline of the approach used

Pipeline & Output:

a) Main Model 1: BERT Tokeniser with Bert model

Figure 2: Pipeline for BERT Tokeniser with Bert model

b) Main Model 2: TF-IDF Tokenizer with Passive Aggressive Classifier

Figure 3: Pipeline for TF-IDF Tokenizer + Passive Aggressive Classifier

WebApp:

  • An end-to-end deployed tool which allows user to verify news articles in a click.
  • This project is the first step toward creating a data protection mechanism to protect against the spreading of fake news on social networks. The outcome of this research is proposed to be essential to designing innovative online social networks.

Features

  1. Users can enter input directly.
  2. Users can load random news articles
  3. Users can see the text processing pipeline live.