Skip to content

shubhrathi02/logistic-regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logistic-regression

Sentiment Analysis using logistic regression(from scratch).

The goal is to perform sentiment analysis of hotel reviews.

  • Training data is in the form of positive and negative hotel reviews.

Features:

  • There are 6 following features selected for this project:

alt text

  • Consider following words for feature 4: "I", "me", "mine", "my", "you", "your", "yours", "we", "us", "ours".

Data:

  • There are two files pos_reviews.txt and neg_reviews.tx which contains positive and negative reviews respectively.
  • pos_words.txt and neg_words.txt files contain positive and negative words respectively.

Code:

  • There are two files in code: feature_extractor.py and logistic_regression.py.
  • feature_extractor.py extracts the above mentioned features from the Hotel reviews available and logistic_regression.py performs Logistic Regression on those features. It is implemented from scratch without using any scikit-learn libraries.

Result:

Conclusion:

About

Sentiment Analysis using logistic regression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages