Detect fake South African based news using classification models
# COMS4045A NLP - Project: South African Fake news classifier
## About the project
The aim of this project is to detect whether South African based news articles are fake or legitimate.
## Implemented models
* Naive Bayes Classifier
* TextRNN: A bidirectional LSTM neural network used for text classification.
## Dataset
* The fake news are from South African Disiniformation website data -2020.
* The real news were scraped by me from News24.
I then merged the two datasets and shuffled them to create a dataset that I can use to train my classifier models.
## Getting started
* The Word embedding notebook was run on Google Colab using their GPU's.
* The Naive Bayes notebook can be run locally using the requirements below.
## Requirements
Recommended to use Anaconda for managing your environment.
1. Create a new environment using the `environment.yml` file:
```bash
conda env create -f environment.yml
```
2. Activate the new environment
```bash
conda activate ENV
```
3. Verify new environment was installed correctly
```bash
conda env list
```
## Model Performance
| Metrics | Naive Bayes | textRNN |
| ------------- |:-------------:| -----:|
| Valid Accuracy | - | 0.54 |
| Test Accuracy | 0.89 | $0.48 |
| AUC| 0.95 | 0.56 |
| Precision| 0.89 | 0.24 |
| Recall| 0.89 | 0.50 |
| F1-score| 0.89 | 0.33 |
## References
* Text Classification(tfidf vs word2vec vs bert)
* Text Analysis: Feature Engineering with NLP
* Fake news Detection using NLP techniques
* PyTorch Text Classification Tutorial
* Recurrent Convolutional Neural Networks for Text Classification
* Lena Voita: NLP Course|For you
## Future Work
* Improve Performance of the Recurrent Neural Network.
* Collect more data.
* Implement a RCNN model.
* Implement a Language Model such as BERT.