Skip to content

Sentiment Analysis for text with Logistic Regression ๐Ÿ’ป๐Ÿ˜€โ˜น๏ธ

Notifications You must be signed in to change notification settings

matteonaccarato/sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Sentiment Analysis for text with Logistic Regression ๐Ÿ’ป๐Ÿ˜€โ˜น๏ธ

Implemented a Logistic Regression algorithm to classify text data (e.g. tweets and posts) based on sentiment analysis (positive or negative)
The dataset used is taken from from nltk.corpus import twitter_samples


HOW

๐Ÿง‘โ€๐Ÿ’ป Python


USAGE

python main.py

Runs the main script


EXAMPLEs

  • "Today is beautiful day!! :)" prediction -> 1 (positive)
  • "I am hopeless for the next week :(" prediction -> 0 (negative)
  • "That decision was a shame!" prediction -> 0 (negative)

Confusion Matrix

Accuracy : 99.7%
Total False Positive/Negative Rate : 0.3%
Here is the confusion matrix used to define thethe performance of the classification algorithm
Confusion Matrix

About

Sentiment Analysis for text with Logistic Regression ๐Ÿ’ป๐Ÿ˜€โ˜น๏ธ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages