Skip to content

Fake News Prediction System using logistic regression, stopwords, nltk

License

Notifications You must be signed in to change notification settings

nano-bot01/Fake-News-Prediction-System-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Fake-News-Prediction-System-

Fake News Prediction System using logistic regression, stopwords, nltk

Dataset information :

DATASET LINK

  1. id: unique id for a news article
  2. title: the title of a news article
  3. author: author of the news article
  4. text: the text of the article; could be incomplete
  5. label: a label that marks whether the news article is real or fake: 1: Fake news 0: real News

Dependencies

import numpy as np
import pandas as pd
import re
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
import matplotlib.pyplot as plt