Analyzing Public Sentiment Toward Apple and Google Products: The SentimentFlow Project
In today's digital world, customer feedback on platforms like Twitter is a goldmine for companies. Whether it's Apple launching the latest iPhone or Google unveiling new software features, customers turn to social media to share their experiences. However, tracking this feedback in real-time can be daunting, especially when millions of tweets are shared daily.
SentimentFlow a project aimed at providing real-time insights into public sentiment toward Apple and Google products by classifying tweets as positive, negative, or neutral. Developed collaboratively, this project taps into the power of Natural Language Processing (NLP) to extract meaningful insights from unstructured Twitter data.
The Motivation Behind SentimentFlow
Companies, marketing teams, and decision-makers often rely on customer feedback to make strategic decisions. Understanding the pulse of public sentiment can help adjust marketing campaigns, resolve customer complaints swiftly, and inform product development. SentimentFlow provides these insights by analyzing tweets about Apple and Google products.
The primary goal of this project was to create a highly accurate sentiment classification model that stakeholders could rely on to make data-driven decisions.
Problem Statement
Our aim was to accurately classify tweet sentiments into three categories: positive, negative, and neutral. With this classification, companies like Apple and Google can gauge public perception, tailor their responses, and improve product offerings based on sentiment trends.
Key Stakeholders
- Apple & Google: Monitor product perception, customer satisfaction, and identify areas for improvement.
- Marketing Teams: Adjust promotional campaigns based on the feedback to optimize brand messaging.
- Decision-Makers: Leverage insights to guide product development, handle public relations, and enhance brand reputation.
Value Proposition
Accurate sentiment classification provides actionable insights:
- Negative sentiment: Prompts immediate action to address product issues.
- Positive sentiment: Reinforces successful strategies.
- Neutral sentiment: Offers context for understanding general consumer thoughts.
Project Objectives
The project’s main objective was to develop an NLP model for multiclass classification with:
- Recall score ≥ 80%
- Accuracy ≥ 80%
- Three sentiment classes: Positive, Negative, and Neutral.
We also aimed to:
- Identify commonly used words using word clouds.
- Analyze sentiment distribution.
- Recognize products mentioned in the tweets.
Data Analysis
We analyzed tweets about Apple and Google products, visualizing the most frequent words, sentiment distribution, and bigrams (word pairs) to understand the data better. A clear class imbalance in sentiments (especially negative and neutral tweets) was noted, which posed a challenge during modeling.
Data Modeling
We tested multiple machine learning algorithms to classify tweet sentiments:
- Random Forest
- Naive Bayes (MultinomialNB)
- Logistic Regression
- Decision Trees
To vectorize the text data, we used CountVectorizer and TF-IDF Vectorizer to convert tweets into numerical format. We then assessed which method provided better feature representation for the models.
Model Performance
Our best-performing models were Random Forest and Logistic Regression, with TF-IDF vectorization yielding the most accurate results:
- Random Forest (TF-IDF): Accuracy = 83.7%, Recall = 83.6%
- Logistic Regression (TF-IDF): Accuracy = 83.5%, Recall = 83.4%
This indicated that TF-IDF offered superior representation compared to Count Vectorizer for both models.
Challenges and Solutions
- Class Imbalance: With far more neutral and negative tweets than positive ones, we used techniques like SMOTE (Synthetic Minority Over-sampling Technique) to balance the data.
- Real-Time Processing: The app was designed to handle tweets in real-time, allowing stakeholders to see sentiment trends as they unfolded.
Deployment
The SentimentFlow app was deployed using Streamlit, allowing users to access the sentiment analysis through an intuitive web interface. The app showcases real-time insights and allows for interactive exploration of sentiment trends. The link to the Sentimentflow App 👈
Results
Our analysis revealed interesting trends in public sentiment:
- Apple products generally received a mix of neutral and positive sentiments, especially during major launches.
- Negative sentiments were more pronounced when there were software glitches or controversial decisions, particularly for Google products.
Recommendations for Future Work
- Real-Time Monitoring: Implement an alert system for negative sentiment spikes to enable companies to respond proactively.
- Scalability: Optimize the models to handle larger datasets and more complex text inputs.
- Continuous Model Monitoring: Regularly retrain the model with new data to maintain high accuracy.
- Integration with APIs: Enhance the system by integrating it with other social media platforms for a broader analysis.
Conclusion
SentimentFlow demonstrates the power of NLP and machine learning in extracting meaningful insights from social media. The project's success in classifying sentiments with high accuracy provides valuable feedback for companies and marketing teams. With further enhancements, SentimentFlow could be a go-to tool for monitoring public sentiment in real time, helping brands stay connected with their audience and respond to trends efficiently.
Our Project link SentimentFlow Project

No comments:
Post a Comment