A Natural Language Processing (NLP) project that classifies news articles as FAKE or REAL using TF-IDF Vectorization and Logistic Regression.
This project uses machine learning and NLP techniques to detect whether a news article is fake or genuine.
The workflow includes:
- Loading and merging real/fake news datasets
- Data preprocessing
- Text cleaning
- Feature engineering
- TF-IDF vectorization
- Logistic Regression model training
- Performance evaluation
- Custom prediction function
- Python
- Jupyter Notebook
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-learn
- NLTK
- WordCloud
Dataset contains:
- Fake news articles
- Real news articles
Source: Kaggle Fake and Real News Dataset
Performed:
- Fake vs Real distribution analysis
- Text preprocessing
- Word cloud generation
Model used:
Logistic Regression
Text vectorization:
TF-IDF Vectorizer
Train/Test split:
- 80% Training
- 20% Testing
Accuracy achieved:
98%
Classification performance:
- Precision: 98–99%
- Recall: 98–99%
- F1 Score: 98%
Example:
predict_news("Breaking news about election fraud...")Output:
🚨 Fake News
git clone https://github.com/YOUR-USERNAME/fake-news-detection.git
cd fake-news-detection
pip install -r requirements.txt
jupyter lab- Deploy with Streamlit
- Try Naive Bayes / Random Forest
- Use advanced NLP models (BERT)
Siva Priyanka
Passionate about Machine Learning, NLP, and building real-world AI projects 🚀



