This project aims to build a machine learning model to accurately classify news articles as either 'FAKE' or 'REAL'. The project employs text cleaning, feature engineering, and Random Forest Classifier for achieving high classification accuracy. Dataset taken from https://www.kaggle.com/datasets/rchitic17/real-or-fake
- Python 3.7
- Pandas
- Scikit-learn
- NLTK
- Text Cleaning: Removal of special characters, stopwords, and lemmatization.
- Text Vectorization: Using Term Frequency-Inverse Document Frequency (TF-IDF).
- Classification: Utilizes Random Forest Classifier for news classification.
- Evaluation: Metrics such as accuracy, precision, recall, and F1-score are used for model evaluation.
- Clone the repository to your local machine.
git clone https://github.com/WilliamHackspeare/Fake-News-Classification.git - Navigate to the project directory.
cd Fake-News-Classification - Install the required packages.
pip install -r requirements.txt
- Run the Python script to train the model and evaluate its performance.
python Fake_News_Classification.py
- Model Accuracy: 91.2%
- Precision, Recall, and F1-score: Above 90% for both 'FAKE' and 'REAL' classes.