This project classifies tweets as Negative, Neutral, or Positive using Machine Learning.
- ~75K tweets
- After cleaning: ~57K tweets
- Columns:
id,entity,sentiment,tweet
Dataset: Twitter Entity Sentiment Analysis
- Clean and preprocess tweets (remove links, mentions, hashtags, punctuation).
- Convert text into numbers using TF-IDF.
- Train a Logistic Regression model.
- Evaluate with accuracy, precision, recall, and F1-score.
- Accuracy: ~79%
- F1-scores:
- Negative: 0.82
- Neutral: 0.76
- Positive: 0.79
tweet = "I love programming! #coding" prediction = model.predict(vectorizer.transform([tweet])) print(prediction) # Positive