{"id":29253502,"url":"https://github.com/yashrk3103/spam-detector","last_synced_at":"2026-05-09T02:13:31.413Z","repository":{"id":301909781,"uuid":"1010636438","full_name":"yashrk3103/Spam-detector","owner":"yashrk3103","description":"E-mail/SMS Spam Detector","archived":false,"fork":false,"pushed_at":"2025-06-29T14:14:40.000Z","size":220680,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T15:26:24.537Z","etag":null,"topics":["jupyter-notebook","lime","naive-bayes-classifier","python","streamlit"],"latest_commit_sha":null,"homepage":"https://spam-detector0.streamlit.app/","language":"HTML","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/yashrk3103.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}},"created_at":"2025-06-29T13:52:37.000Z","updated_at":"2025-06-29T14:14:43.000Z","dependencies_parsed_at":"2025-06-29T15:36:43.143Z","dependency_job_id":null,"html_url":"https://github.com/yashrk3103/Spam-detector","commit_stats":null,"previous_names":["yashrk3103/spam-detector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yashrk3103/Spam-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrk3103%2FSpam-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrk3103%2FSpam-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrk3103%2FSpam-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrk3103%2FSpam-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashrk3103","download_url":"https://codeload.github.com/yashrk3103/Spam-detector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashrk3103%2FSpam-detector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279818743,"owners_count":26231467,"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-19T02:00:07.647Z","response_time":64,"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":["jupyter-notebook","lime","naive-bayes-classifier","python","streamlit"],"created_at":"2025-07-04T02:02:59.895Z","updated_at":"2025-10-19T13:20:44.431Z","avatar_url":"https://github.com/yashrk3103.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📩 Email/SMS Spam Detector with Explainability\r\n\r\nThis project is a complete end-to-end machine learning application that detects whether a given **email or SMS message is spam or not**, using advanced **natural language processing (NLP)** and a **Naive Bayes classifier** — all wrapped in a modern and interactive **Streamlit** web interface.\r\n\r\nThe application goes beyond simple classification by providing **model explainability using LIME (Local Interpretable Model-Agnostic Explanations)**, helping users understand *why* a message was classified as spam or ham. This makes the system transparent, educational, and more trustworthy for users.\r\n\r\n---\r\n\r\n## 🚀 Project Goals\r\n\r\n- Build a robust ML model to classify messages as **spam** or **ham**\r\n- Apply **real-world NLP preprocessing**: cleaning URLs, numbers, symbols, and noise\r\n- Use **TF-IDF vectorization** with 1–3 gram features for enhanced pattern recognition\r\n- Enable **LIME explainability** to highlight influential words/phrases\r\n- Visualize predictions and explanations in a clean, browser-based UI\r\n\r\n---\r\n\r\n## 🔍 Key Features\r\n\r\n- 🧠 Custom preprocessing pipeline to normalize text\r\n- 📊 TF-IDF vectorizer (1–3 grams, max 10,000 features)\r\n- ⚖️ Tuned Multinomial Naive Bayes model with smoothing\r\n- 🎯 Multi-level spam detection thresholds:\r\n  - 80%+ → Definite spam  \r\n  - 60–80% → Likely spam  \r\n  - 40–60% → Potential spam  \r\n  - Below 40% → Ham\r\n- 🔎 LIME-powered explainability:\r\n  - Top influential words/phrases\r\n  - Impact strength (strong/moderate/weak)\r\n  - Color-coded bar chart for interpretation\r\n- 🧪 Uses the **SMS Spam Collection Dataset** (UCI)\r\n\r\n---\r\n\r\n## 💡 What You’ll Learn from This Project\r\n\r\n- How to clean and vectorize textual data\r\n- How to train, evaluate, and persist ML models using `scikit-learn`\r\n- How to build modular, production-ready ML pipelines\r\n- How to serve ML models as interactive web apps using Streamlit\r\n- How to apply **Explainable AI (XAI)** to NLP use cases\r\n\r\n---\r\n\r\n## 📂 Technology Stack\r\n\r\n- **Frontend \u0026 UI**: Streamlit  \r\n- **Data Handling**: Pandas  \r\n- **Modeling**: Scikit-learn (Naive Bayes + TF-IDF)  \r\n- **Explainability**: LIME  \r\n- **Visualization**: Matplotlib  \r\n- **Packaging**: Joblib\r\n\r\n---\r\n\r\n## 📁 Dataset\r\n\r\nThis project is trained on the **SMS Spam Collection Dataset**, a popular benchmark dataset for binary text classification tasks involving spam detection. It contains over 5,000 real SMS messages labeled as `spam` or `ham`.\r\n\r\nDataset source: [UCI Machine Learning Repository](https://www.kaggle.com/datasets/uciml/sms-spam-collection-dataset)\r\n\r\n---\r\n\r\n## 📌 Use Cases\r\n\r\n- Educational tool for learning NLP and spam detection\r\n- Lightweight explainable AI (XAI) demo\r\n- Prototype for filtering malicious or promotional SMS/email traffic\r\n- Deployment-ready ML app for showcasing end-to-end ML skills\r\n\r\n---\r\n\r\nFeel free to explore the code, tweak parameters, add new features, or integrate more advanced models like Logistic Regression or BERT in future versions.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashrk3103%2Fspam-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashrk3103%2Fspam-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashrk3103%2Fspam-detector/lists"}