Skip to content

SheCodes-IEEE-CIS-GHRCE/Fake-news-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Fake-news-Detection

What are fake news?🤔

Fake news definition is made of two parts: authenticity and intent. Authenticity means that fake news content false information that can be verified as such, which means that conspiracy theory is not included in fake news as there are difficult to be proven true or false in most cases. The second part, intent, means that the false information has been written with the goal of misleading the reader.Fake news has quickly become a society problem, being used to propagate false or rumour information in order to change peoples behaviour.

This python project of detecting fake news deals with fake and real news. Using sklearn, we build a TfidfVectorizer on political dataset. Then, we initialize a PassiveAggressive Classifier and fit the model. In the end, the accuracy score and the confusion matrix tell us how well our model fares.

✅Steps for detecting fake news:

1. Make necessary imports

2. Read the data into a DataFrame, and get the shape of the data

3. Get the labels from the DataFrame

4. Split the dataset into training and testing sets

5. Initialize a TfidfVectorizer and Fit and transform train set, transform test set/p>

6. Initialize a PassiveAggressiveClassifier , Predict on the test set and calculate accuracy

7. print out a confusion matrix to gain insight into the number of false and true negatives and positives

🔗Link for downloading dataset:- https://drive.google.com/file/d/1er9NJTLUA3qnRuyhfzuN0XUsoIC4a-_q/view

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •