From 04823c75f47b438e8953facb439751db59706106 Mon Sep 17 00:00:00 2001 From: Kriti Subedi Date: Tue, 14 Apr 2026 08:40:19 -0230 Subject: [PATCH] fix readme file --- README.md | 193 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 101 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 87d1947..f49a91d 100644 --- a/README.md +++ b/README.md @@ -2,64 +2,58 @@ ## ๐Ÿ“Œ Project Overview -This project was developed by a three-person academic team over 10 weeks (part-time, $0 budget). +This project was developed by a three-person academic team over 10 weeks on a part-time basis with a $0 budget. -The **Review Guard System** is a locally runnable web application that uses **Natural Language Processing (NLP)** and **Machine Learning** to classify online reviews as: +**Review Guard** is a locally runnable web application that uses **Natural Language Processing (NLP)** and **Machine Learning** to classify online reviews as: -- โœ… Genuine -- โŒ Fake +* โœ… Genuine +* โŒ Fake ## ๐Ÿš€ Features -- Single review prediction -- Batch CSV upload and processing -- Fake/Genuine classification -- Fake probability score output -- Download results as CSV -- Multiple model support (v1, v2, v3) -- Fully offline system +* Single review prediction +* Batch CSV upload and processing +* Fake/Genuine classification +* Fake probability score output +* Download results as CSV +* Multiple model support (`v1`, `v2`, `v3`) +* Fully offline system - -```markdown ## ๐Ÿ“‚ CSV Format The CSV file must contain the following columns: +```text text,rating,helpful_vote,verified_purchase - +``` ## ๐ŸŽฏ Project Goals -- Achieve **greater than 80% classification accuracy** on unseen test data -- Develop a **fully offline, locally runnable web application** -- Support both **single review prediction and batch CSV processing** -- Provide **fake probability scores for each prediction** -- Follow an **Agile development methodology with iterative improvements** -- Ensure **fast response time and user-friendly interface** - +* Achieve **greater than 80% classification accuracy** on unseen test data +* Develop a **fully offline, locally runnable web application** +* Support both **single review prediction and batch CSV processing** +* Provide **fake probability scores for each prediction** +* Follow an **Agile development methodology with iterative improvements** +* Ensure **fast response time and user-friendly interface** ## ๐Ÿ› ๏ธ Technologies Used -- **Backend:** Python (Flask) -- **Frontend:** HTML, CSS, JavaScript -- **ML/NLP:** Scikit-learn, NLTK -- **Data Processing:** Pandas, NumPy -- **Model Storage:** Joblib -- **Testing:** Pytest -- **CI/CD:** GitHub Actions - +* **Backend:** Python, Flask +* **Frontend:** HTML, CSS, JavaScript +* **ML/NLP:** Scikit-learn, NLTK +* **Data Processing:** Pandas, NumPy +* **Model Storage:** Joblib +* **Testing:** Pytest +* **CI/CD:** GitHub Actions ## ๐Ÿ“‚ Dataset ### Label Definition -- `1` โ†’ Fake review -- `0` โ†’ Genuine review - -Note: The model uses binary classification where 1 represents fake and 0 represents genuine. - - +* `1` โ†’ Fake review +* `0` โ†’ Genuine review +The system uses binary classification where `1` represents a fake review and `0` represents a genuine review. ## ๐Ÿ“‚ Project Structure @@ -103,110 +97,125 @@ Review-1/ โ”‚ โ”œโ”€โ”€ notebooks/ โ”‚ โ””โ”€โ”€ src/ โ””โ”€โ”€ images/ +``` ## โš™๏ธ Installation -- pip install -r requirements.txt +```bash +pip install -r requirements.txt +``` -## โœ… RUN APPLICATION +## โœ… Run Application ```bash python3 run.py +``` +## ๐Ÿ‹๏ธ Train Models -๐Ÿ‹๏ธ Train Models -## Default Training (Recommended) +### Default Training (Recommended) -- python app/ml/training/train_model.py \ ---input_csv dataset/amazon_labeled_fake_reviews/final_labeled_fake_reviews.csv \ ---phase1_root app \ ---random_seed 42 +```bash +python app/ml/training/train_model.py \ + --input_csv dataset/amazon_labeled_fake_reviews/final_labeled_fake_reviews.csv \ + --phase1_root app \ + --random_seed 42 +``` +### Train Model Versions -## ๐Ÿ”น Train Model Versions -- **v1 (Hybrid):** Text + metadata -- **v2 (Text-only):** Only text features -- **v3 (Best Model):** Blended model combining v1 + v2 +* **v1 (Hybrid):** Text + metadata +* **v2 (Text-only):** Only text features +* **v3 (Best Model):** Blended model combining v1 + v2 +#### v1 + +```bash +python app/ml/training/train_model.py --include_behavioral --model_version phase1-v1 +``` +#### v2 -## v1 -- python app/ml/training/train_model.py --include_behavioral --model_version phase1-v1 +```bash +python app/ml/training/train_model.py --model_version phase1-v2 +``` +#### v3 (Best) -## v2 -- python app/ml/training/train_model.py --model_version phase1-v2 +```bash +python app/ml/training/train_model_v3.py +``` +### Optional (Advanced) -## v3 (Best) -- python app/ml/training/train_model_v3.py +```bash +python app/ml/training/train_model.py --enable_xgboost +``` ## ๐Ÿงช Testing -- 106 test cases implemented -- 100% pass rate -- Includes: - - Unit Testing - - Integration Testing - - Security Testing - - Regression Testing +* 106 test cases implemented +* 100% pass rate +* Includes: + * Unit Testing + * Integration Testing + * Security Testing + * Regression Testing +### Run Tests -## Optional (Advanced) +```bash +python3 -m pytest -q app/tests +``` -- python app/ml/training/train_model.py --enable_xgboost +## ๐Ÿ“Š Model Evaluation -## Run Tests -- python3 -m pytest -q app/tests +The system is evaluated using: +* Accuracy +* Precision +* Recall +* F1-Score -๐Ÿ“Š Model Evaluation -- Accuracy (>80%) -- Precision -- Recall -- F1-Score +## โš ๏ธ Risk and Validation +To reduce data leakage and improve reliability, the project includes: -โš ๏ธ Risk & Validation -- To avoid data leakage: -- Text normalization + hashing -- Duplicate-safe splitting -- Near-duplicate audit -- Remaining Risk -- Paraphrased reviews may still exist โ†’ residual risk +* Text normalization and hashing +* Duplicate-safe splitting +* Near-duplicate audit -## โš™๏ธ CI/CD +### Remaining Risk -- GitHub Actions used -- Automated testing on every push +* Paraphrased reviews may still exist in the dataset, creating residual risk +## โš™๏ธ CI/CD +* GitHub Actions used +* Automated testing on every push ## ๐Ÿ“Š Project Management (Jira) -The project was managed using Jira with sprint planning and task tracking. - - +The project was managed using **Jira** with sprint planning and task tracking. ### ๐Ÿ—‚๏ธ Jira Board Overview ![Jira Board](images/jira-board.png) ## ๐Ÿ“… Agile Milestones -- Planning & Dataset Preparation -- Model Development & Evaluation -- Web Application Integration -- Testing & Final Delivery - +* Planning and dataset preparation +* Model development and evaluation +* Web application integration +* Testing and final delivery ## ๐Ÿ‘ฅ Team -- Kriti Subedi -- Swapnali Kudale -- Aditi Sharma - +* Kriti Subedi +* Swapnali Kudale +* Aditi Sharma ## ๐Ÿ“œ License -Developed for academic purposes only. \ No newline at end of file + +Developed for academic purposes only.