Git Product home page Git Product logo

karan-malik / fakenewsdetection Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 36.63 MB

Using Machine Learning and NLP to segregate the unreliable and reliable news articles

License: MIT License

Python 100.00%
machine-learning machine-learning-algorithms nlp natural-language-processing nlp-machine-learning scikit-learn scikitlearn-machine-learning python python3 news fake-news fakenewsdetection numpy artificial-intelligence

fakenewsdetection's Introduction

FakeNewsDetection

Using Machine Learning and NLP to segregate the unreliable and reliable news articles

About this Project

This project analyzes about 18k news articles and their titles, lemmatizes and cleans them and then uses them as features, which are then used in Logistic Regression, to classify them as reliable (0) or not reliable (1). It is able to achieve a test set accuracy of 95.8%.

Dataset

The dataset used is available on Kaggle. It contains over 20000 news articles along with their authors, titles and labels classifying them as reliable or not reliable.

It is present as train.csv in the repository. To access the data online, follow this link.

How to Run the Model on your System

  1. Use this link to download the dataset and set the folder containing the downloaded data as the working directory.

  2. Make sure you have all the libraries used in the fake_news.py file. In case you need to download any of the libraries, use this command:

pip install 'your library name'
  1. Once you have all the libraries imported, copy the code from fake_news.py and run it.

fakenewsdetection's People

Contributors

karan-malik avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.