{"id":25631693,"url":"https://github.com/tadiusfrank2001/sentiment_analyst_machine_learning_project","last_synced_at":"2026-05-03T11:33:44.085Z","repository":{"id":251878496,"uuid":"515317879","full_name":"tadiusfrank2001/Sentiment_Analyst_Machine_Learning_Project","owner":"tadiusfrank2001","description":"Design a Decision-Tree Classifer and a Logistical Regression Classifier and compare their performance in Sentiment Analysis on Twitter Tweet data ","archived":false,"fork":false,"pushed_at":"2025-02-10T10:09:34.000Z","size":51320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T20:32:41.032Z","etag":null,"topics":["api","data-science","decision-trees","logistic-regression","machine-learning","machine-learning-algorithms","natural-language-processing","sentiment-analysis","skit-learn","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tadiusfrank2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-07-18T19:37:21.000Z","updated_at":"2025-02-10T10:09:39.000Z","dependencies_parsed_at":"2024-08-06T09:54:33.413Z","dependency_job_id":"7c2741a3-2976-4dd3-9b4f-67f71be4b7db","html_url":"https://github.com/tadiusfrank2001/Sentiment_Analyst_Machine_Learning_Project","commit_stats":null,"previous_names":["tadiusfrank2001/machinelearningproject","tadiusfrank2001/sentiment_analyst_machine_learning_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tadiusfrank2001/Sentiment_Analyst_Machine_Learning_Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadiusfrank2001%2FSentiment_Analyst_Machine_Learning_Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadiusfrank2001%2FSentiment_Analyst_Machine_Learning_Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadiusfrank2001%2FSentiment_Analyst_Machine_Learning_Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadiusfrank2001%2FSentiment_Analyst_Machine_Learning_Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tadiusfrank2001","download_url":"https://codeload.github.com/tadiusfrank2001/Sentiment_Analyst_Machine_Learning_Project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadiusfrank2001%2FSentiment_Analyst_Machine_Learning_Project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","data-science","decision-trees","logistic-regression","machine-learning","machine-learning-algorithms","natural-language-processing","sentiment-analysis","skit-learn","tensorflow"],"created_at":"2025-02-22T20:29:02.101Z","updated_at":"2026-05-03T11:33:44.068Z","avatar_url":"https://github.com/tadiusfrank2001.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentiment Analysis Machine Learning Project\n\n## Overview\n\nThe goal of this project was to perform sentiment analysis on a Twitter dataset using two different machine learning models: Decision Tree and Logistic Regression. \nThe focus was on evaluating which model performed sentiment classification better in terms of accuracy.\n\n## Sentiment Classification\nSentiment classification is a type of text classification problem, where instead of classifying based on the topic of the text, the focus is on the sentiment or opinion lexicon that indicates whether an opinion is positive, negative or neutral. \nTo reduce the complexity and improve classification accuracy, I filtered out neutral lexicons, or “stopwords,” using Python’s `nltk` library, as they are less informative. \nThis approach allows us to treat sentiment classification as a binary classification problem, ignoring the neutral class and classifying text as either positive or negative.\n\nAfter vectorizing the text and counting the frequency of sentiment lexicons, I fitted a Logistic Regression model on the preprocessed data with a 70-30 train-test split. \nI then evaluated whether removing neutral lexicons impacts the results and implemented a Decision Tree classifier to compare performance.\n\n## Challenges and Adjustments\nInitially, the project code was structured to handle non-NLP-based datasets, which only involved numerical data. \nTo address this, I augmented the code to properly handle the text data by reading the CSV file, removing stop words, and filtering out characters such as emojis and \"@\" mentions. Additionally, the dataset was contextually labeled based on a specific scenario (e.g., a video game Twitter thread), where logically negative actions might be labeled as positive.\n\nThe dataset consisted of over 1.6 million entries, which posed challenges in terms of runtime and computational resources. To manage this, we trained and tested our models on physical university lab machines with greater GPU and CPU capacity.\n\n## Technologies Used\n`Python`: Programming language used.\n\n`scikit-learn`: For implementing the Decision Tree and Logistic Regression models.\n\n`Pandas`: For data manipulation and analysis.\n\n`NumPy`: For numerical computations.\n\n`NLTK`: For natural language processing tasks.\n\n## Project Structure\n`experiment.py`: Cleans and preprocesses the Twitter dataset, including removing stop words and extra punctuation.\n\n`classify.py`: Contains the Logistic Regression and Decision Tree classifiers used to train and evaluate the models.\n\n`data/`: Directory containing the Twitter tweet data, split into multiple 25MB files for easier management.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftadiusfrank2001%2Fsentiment_analyst_machine_learning_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftadiusfrank2001%2Fsentiment_analyst_machine_learning_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftadiusfrank2001%2Fsentiment_analyst_machine_learning_project/lists"}