This project aims to detect fake news articles using machine learning techniques implemented in Python. It employs a PassiveAggressiveClassifier to classify news articles as either real or fake based on their content.
Fake news has become a significant issue in today's digital age. This project offers a solution by leveraging machine learning algorithms to automatically identify and flag potentially deceptive news articles. By analyzing textual features and training on a dataset containing both fake and real news articles, the system learns to distinguish between genuine and fabricated information.
The project utilizes two main datasets:
- [
Fake.csv.zip
]: Contains fake news articles. - [
True.csv.zip
]: Contains real news articles.
These datasets serve as the basis for training and evaluating the fake news detection model. Please note that you need to unzip these files before using them.
-
Download the provided datasets:
- [Download Fake.csv.zip]
- [Download True.csv.zip]
-
Extract the contents of the downloaded zip files.
-
Install the required packages:
pip install -r requirements.txt
Run the fakenewsdetection.py
script to execute the fake news detection system.
python fakenewsdetection.py
fakenewsdetection.py
: Main script for fake news detection.requirements.txt
: List of required Python packages.Datasets/
: Directory containing the datasets (Fake.csv.zip
andTrue.csv.zip
).
The project includes visualizations for:
- Confusion matrix
- Feature weights distribution
These visualizations provide insights into the performance of the fake news detection model and the importance of different features in making predictions.