Abilashkanagasabai / Fake-News-Classifier-using-LSTM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fake News Detection

Overview

The topic of fake news detection on social media has recently attracted tremendous attention. The basic countermeasure of comparing websites against a list of labeled fake news sources is inflexible, and so a machine learning approach is desirable. Our project aims to use Natural Language Processing to detect fake news directly, based on the text content of news articles.

Problem Definition

Develop a machine learning program to identify when a news source may be producing fake news. We aim to use a corpus of labeled real and fake new articles to build a classifier that can make decisions about information based on the content from the corpus. The model will focus on identifying fake news sources, based on multiple articles originating from a source. Once a source is labeled as a producer of fake news, we can predict with high confidence that any future articles from that source will also be fake news. Focusing on sources widens our article misclassification tolerance, because we will have multiple data points coming from each source.

The intended application of the project is for use in applying visibility weights in social media. Using weights produced by this model, social networks can make stories which are highly likely to be fake news less visible.

Dataset Description

  • Link to get Data can be found in ipynb file

  • train.csv: A full training dataset with the following attributes:

    • id: unique id for a news article
    • title: the title of a news article
    • author: author of the news article
    • text: the text of the article; could be incomplete
    • label: a label that marks the article as potentially unreliable
      • 1: unreliable
      • 0: reliable
  • test.csv: A testing training dataset with all the same attributes at train.csv without the label.

Try It Out

  1. Clone the repo to your local machine-
    > git clone git://github.com/rockash/ Fake-News-Classifier-using-LSTM.git
    > cd Fake-News-Classifier-using-LSTM

  2. Make sure you have all the dependencies installed-

  • python 3.6+
  • numpy
  • tensorflow
  • gensim
  • pandas
  • nltk
    • For nltk, we recommend typing python.exe in your command line which will take you to the Python interpretor.
      • Then, enter-
        • >>> import nltk
        • >>> nltk.download()}
  1. You're good to go now-
    > FakeNewsClassifierUsingLSTM.ipynb

Model Used and accuracy

  • Model Used--Deep learning LSTM model
  • Accuracy----91.5%

References

About


Languages

Language:Jupyter Notebook 100.0%