Skip to content

adithyaravi12/fake-news

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Differentiating Fake and Real News

A model is trained to recognize false and true news from the provided training dataset using Passive Aggressive Classifier from scikit learn, and predictions are made on the test dataset.

Procedure

1. Import dependencies
2. Read tehe dataset and store it as a dataframe
3. Store the labels from the dataset as an individual dataframe named labels
4. Now, using train_test_split from sklearn, split the test and training datasets using the 'text' and 'labels' columns only
5. Since this is an information retreival problem,  term frequency-inverse document frequency(tfidf) is 
used with the stop_words in English language and the model is trained.
6. The PAC is now fitted on the training dataset and allowed to train for 50 iterations
7. Predictions are made and the confusion matrix is displayed

Run Locally

Clone the project

  git clone https://github.com/adithyaravi12/fake-news

Go to the project directory

  cd fake-news

Install necessary dependencies

  npm install

Start the server

  npm run start

Screenshots

App Screenshot

🔗 Links

My Portfolio linkedin

Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published