Fake news detection using Data Analytics method along with python language.
The dataset used for this project is news.csv. Dataset has a shape of 7796*4. The dataset has four columns: first identifies the news, second and third are title and text and the fourth one is the label denoting FAKE or REAL.
Follow the below steps to complete the project:
- Make the necessary imports.
- Read the data into the data frame and get the shape of the data.
- Now get the labels from the DataFrame.
- Split the dataset into training and testing models.
- Initialize the TfidfVectorizer with stop words from English and maximum document frequency of 0.7.
- Initialize the PassiveAggressiveClassifier.
- At last print the confusion matrix to gain the data about false and true negatives and positives.
- After completion of the project, we get an accuracy of 92.82%.
Software requirements: Pycharm Community Edition.
Programming Languages and modules: Python3, Numpy-module, pandas, sklearn.