{"id":31649286,"url":"https://github.com/ankitwalimbe/sentiment-analysis","last_synced_at":"2026-05-06T06:32:33.130Z","repository":{"id":315657785,"uuid":"1060387834","full_name":"AnkitWalimbe/sentiment-analysis","owner":"AnkitWalimbe","description":"Sentiment analysis of Amazon Fashion reviews using VADER and a baseline ML model (TF-IDF + SGDClassifier). Includes visualizations, reproducible notebook, and recruiter-ready documentation.","archived":false,"fork":false,"pushed_at":"2025-09-19T21:24:32.000Z","size":904,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T23:57:17.324Z","etag":null,"topics":["data-analysis","machine-learning","matplotlib","nlp","pandas","python","seaborn","sentiment-analysis","sklearn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnkitWalimbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T20:34:33.000Z","updated_at":"2025-09-19T21:28:34.000Z","dependencies_parsed_at":"2025-09-20T00:07:26.123Z","dependency_job_id":null,"html_url":"https://github.com/AnkitWalimbe/sentiment-analysis","commit_stats":null,"previous_names":["ankitwalimbe/sentiment-analysis"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AnkitWalimbe/sentiment-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnkitWalimbe%2Fsentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnkitWalimbe%2Fsentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnkitWalimbe%2Fsentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnkitWalimbe%2Fsentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnkitWalimbe","download_url":"https://codeload.github.com/AnkitWalimbe/sentiment-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnkitWalimbe%2Fsentiment-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278740831,"owners_count":26037480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","machine-learning","matplotlib","nlp","pandas","python","seaborn","sentiment-analysis","sklearn"],"created_at":"2025-10-07T07:41:58.272Z","updated_at":"2025-10-07T07:42:02.653Z","avatar_url":"https://github.com/AnkitWalimbe.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentiment Analysis on Amazon Fashion Reviews \n\nThis project applies Natural Language Processing (NLP) to analyze customer sentiment in **Amazon Fashion reviews**.  \nIt combines **VADER sentiment analysis** with a basic **machine learning model (SGDClassifier + TF-IDF)** to classify reviews into **positive, neutral, or negative** categories.\n\n---\n\n##  Project Overview\n- **Dataset**: Amazon Fashion Reviews (JSONL format, \u003e1M reviews).  \n  The dataset is too large to host here – see [data/README.md](data/README.md) for download instructions.  \n- **Goal**: Explore review text, extract sentiment, and compare rule-based (VADER) vs machine learning approaches.  \n- **Why it matters**: Customer sentiment is a key driver for **returns reduction**, **CX insights**, and **product feedback loops**.\n\n---\n\n##  Project Highlights\n- Processed **~23K Amazon Fashion reviews**.  \n- Applied **VADER sentiment analysis** to classify reviews.  \n- Built a baseline **ML model** using TF-IDF + SGDClassifier.  \n- Visualized sentiment distributions and agreement between VADER and ML.  \n- Saved key plots and reports for reproducibility.  \n\n---\n\n##  Repository Structure\n```plaintext\nsentiment-analysis/\n│── data/               \u003c- raw data (ignored), dataset instructions in README.md\n│── notebooks/          \u003c- Jupyter notebooks\n│── outputs/            \u003c- figures and saved results\n│── reports/            \u003c- generated CSVs (ignored in Git)\n│── .gitignore\n│── README.md           \u003c- project documentation\n\n```\n\n---\n\n##  Workflow\n1. **Data Preprocessing**  \n   - Converted timestamps into structured `date` and `time`.  \n   - Selected relevant fields: `rating`, `title`, `text`, `asin`, `user_id`.  \n   - Handled missing values.  \n\n2. **Exploratory Data Analysis**  \n   - Visualized rating distributions.  \n   - Checked review counts by star ratings.  \n\n3. **Sentiment Analysis with VADER**  \n   - Applied **NLTK VADER** to calculate `pos`, `neg`, `neu`, and `compound` scores.  \n   - Classified reviews into **positive, negative, neutral** buckets.  \n\n4. **Machine Learning Model (Baseline)**  \n   - Used **TF-IDF Vectorizer** to transform review text.  \n   - Trained **SGDClassifier** (linear SVM) on balanced subsets.  \n   - Evaluated with accuracy, classification report, and confusion matrix.  \n\n5. **Comparison: VADER vs ML**  \n   - Created a comparison dataset of predictions.  \n   - Observed significant **bias toward positive reviews** due to data imbalance.  \n\n---\n\n##  Key Outputs\n- **Figures**:  \n  - Rating distribution plots.  \n  - Sentiment distribution (VADER).  \n  - Confusion matrices (ML model \u0026 VADER vs ML).  \n- **Reports**:  \n  - Sentiment comparison CSV.  \n\nAll outputs are saved in the `outputs/figures/` and `reports/` directories.  \n\n---\n\n##  Learnings\n- VADER works well as a quick, rule-based baseline for sentiment.  \n- ML models trained on imbalanced data struggle to classify negative/neutral reviews.  \n- TF-IDF is limited in capturing context — embeddings like Word2Vec, BERT, or GloVe could improve results.  \n- Undersampling balances training data but can **lose information**. Alternative approaches (e.g., SMOTE) may perform better.  \n\n---\n\n##  Next Steps\n- Experiment with **Word2Vec / BERT embeddings**.  \n- Test **Random Forests / Neural Networks** for better classification.  \n- Fine-tune sentiment thresholds in VADER.  \n- Automate preprocessing and evaluation via a pipeline.  \n\n---\n\n##  Tech Stack\n- **Python** (pandas, NumPy, matplotlib, seaborn, tqdm)  \n- **NLP**: NLTK, VADER Sentiment  \n- **ML**: scikit-learn, imbalanced-learn  \n- **Visualization**: seaborn, matplotlib  \n\n---\n\n##  Citation\nDataset reference:  \n\nHou, Yupeng et al. (2024).  \n*Bridging Language and Items for Retrieval and Recommendation.*  \n[arXiv:2403.03952](https://arxiv.org/abs/2403.03952)  \n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitwalimbe%2Fsentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankitwalimbe%2Fsentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitwalimbe%2Fsentiment-analysis/lists"}