How dinesh-m-4103/fake-review-classification works
Purpose and Delivery Form
This repository is an exploratory NLP/ML project for detecting fake product reviews and extracting review themes. It is delivered as two Jupyter notebooks rather than a deployable application or package. Primary execution entry points are Fake_Review_Classification_Notebook(1).ipynb and Fake_Review_Classification_Notebook(2).ipynb; FINAL PROJECT EVALUATION.pptx is a presentation artifact.
Data and Preparation Pipeline
The notebooks process a dataset of 40,432 reviews with text and metadata. The central input transformation is review text normalization: tokenization, alphabetic filtering, lowercasing, NLTK stopword removal, lemmatization, and Porter stemming. Cleaned review text is converted to TF-IDF features with a 5,000-word vocabulary.
• Fake_Review_Classification_Notebook(1).ipynb
• Fake_Review_Classification_Notebook(2).ipynb
Unsupervised Analysis
TF-IDF feature vectors feed clustering and topic discovery. K-means cluster count is selected through an elbow/WCSS analysis, with four clusters chosen; DBSCAN provides an alternative density-based partitioning and better reported silhouette performance. LDA then derives interpretable word-topic distributions from review content.
• Fake_Review_Classification_Notebook(1).ipynb
• Fake_Review_Classification_Notebook(2).ipynb
Supervised Fake-Review Classification
The classification stage follows exploratory clustering/topic modeling and trains multiple model families against fake-review labels: Logistic Regression and SVM over engineered text features, an LSTM sequence model, and a pretrained RoBERTa transformer. This creates two key representation boundaries: TF-IDF vectors for conventional ML/clustering, versus tokenized sequences/transformer inputs for neural models.
• Fake_Review_Classification_Notebook(1).ipynb
• Fake_Review_Classification_Notebook(2).ipynb
Evaluation and Model Selection
Model outputs are evaluated with accuracy, precision, recall, and F1 for conventional ML; LSTM and RoBERTa use accuracy and loss. Reported results select LSTM as the strongest candidate (90% accuracy), followed by SVM (87%), Logistic Regression (85%), and RoBERTa (83%). Comparative reporting is likely surfaced in the project presentation.
• FINAL PROJECT EVALUATION.pptx
• Fake_Review_Classification_Notebook(2).ipynb
Runtime and External Dependencies
Execution requires a Python notebook runtime with NLP and ML libraries implied by the workflow: NLTK resources (English stopwords, WordNet), TF-IDF/vectorization and clustering/classical classifiers, LDA, deep-learning support for LSTM, and a transformer stack/model assets for RoBERTa. No service layer, API, database, deployment infrastructure, or external online service is represented in the repository tree.
Main entry points: Fake_Review_Classification_Notebook(1).ipynb Exploration Notebook · Fake_Review_Classification_Notebook(2).ipynb Classification Notebook · FINAL PROJECT EVALUATION.pptx Project Evaluation Deck
Components 17
Notebook Runtime
Interactive Python analysis notebooks.
- Exploration Notebook · Runs preparation, clustering, topics, and model experiments.
Fake_Review_Classification_Notebook(1).ipynb - Classification Notebook · Runs classification evaluation and comparative reporting.
Fake_Review_Classification_Notebook(2).ipynb - Review Dataset · 40,432 reviews with text, metadata, and fake-review labels.
- NLTK Resources · English stopwords and WordNet resources.
Text Analytics
- Text Normalization · Tokenizes, filters, lowercases, removes stopwords, lemmatizes, and stems text.
- TF-IDF Features · 5,000-word vocabulary vectors for conventional ML and clustering.
- Elbow / WCSS Selection · Selects four K-means clusters.
- K-means Clustering
- DBSCAN Clustering · Alternative density-based partitioning.
- LDA Topic Discovery · Produces interpretable word-topic distributions.
Fake-Review Classification
- Tokenized Sequences · Sequence inputs for the LSTM classifier.
- RoBERTa Inputs · Tokenized inputs and pretrained transformer assets.
- Logistic Regression + SVM · Trained on TF-IDF text features against fake-review labels.
- LSTM Classifier · Selected strongest candidate at 90% accuracy.
- RoBERTa Classifier
- Model Evaluation · Compares accuracy, precision, recall, F1, and neural loss.
Other components
- Project Evaluation Deck · Surfaces comparative model results.
FINAL PROJECT EVALUATION.pptx
Connections 23
- Exploration Notebook → Review Dataset: loads
- Classification Notebook → Review Dataset: loads
- Review Dataset → Text Normalization: review text
- NLTK Resources → Text Normalization: stopwords and lexical data
- Text Normalization → TF-IDF Features: cleaned text
- TF-IDF Features → Elbow / WCSS Selection: vectors
- Elbow / WCSS Selection → K-means Clustering: 4 clusters
- TF-IDF Features → DBSCAN Clustering: vectors
- TF-IDF Features → LDA Topic Discovery: review terms
- Text Normalization → Tokenized Sequences: cleaned text
- Text Normalization → RoBERTa Inputs: review text
- TF-IDF Features → Logistic Regression + SVM: features
- Review Dataset → Logistic Regression + SVM: fake labels
- Tokenized Sequences → LSTM Classifier: sequences
- Review Dataset → LSTM Classifier: fake labels
- RoBERTa Inputs → RoBERTa Classifier: transformer tokens
- Review Dataset → RoBERTa Classifier: fake labels
- Logistic Regression + SVM → Model Evaluation: 85% / 87% results
- LSTM Classifier → Model Evaluation: 90% accuracy and loss
- RoBERTa Classifier → Model Evaluation: 83% accuracy and loss
- Model Evaluation → Project Evaluation Deck: comparative results
- Exploration Notebook → Text Normalization: executes
- Classification Notebook → Model Evaluation: executes