This project implements a Fake News Detector using Python and various machine learning algorithms. It analyzes textual data to classify news articles as either fake or not fake (i.e., real).
The objective of this project is to build a classifier that can distinguish between fake and genuine news articles. It uses the following machine learning algorithms for classification:
- Logistic Regression
- Decision Tree
- Gradient Boosting
- Random Forest
The dataset consists of two main components: "Fake.csv" containing fake news articles and "True.csv" containing genuine news articles. The project preprocesses the textual data, vectorizes it using TF-IDF, and then trains various machine learning models.
To run this project, ensure you have the following dependencies installed:
- pandas
- numpy
- seaborn
- matplotlib
- scikit-learn
- re
- string
You can install these dependencies via pip:
pip install pandas numpy seaborn matplotlib scikit-learn- Clone the repository:
git clone git@github.com:Nahsc0/FakeNews_Detector_Python_ML.git- Navigate to the project directory:
cd FakeNews_Detector_Python_ML- Run the Python script:
python fake_news_detector.py- Input news text when prompted for manual testing.
For any inquiries or feedback, please feel free to reach out to me at Naseeryusuf07@gmail.com.
You can copy and paste this README.md content into a new file named README.md in your GitHub repository. Additionally, don't forget to replace the placeholder email address with your actual contact email. Let me know if you need further assistance!
