This project aims to perform sentiment analysis on Twitter data using a Logistic Regression model built from scratch. The goal is to classify the sentiment of tweets as positive or negative.
The project uses the twitter_samples dataset provided by nltk.corpus. The dataset includes a collection of positive and negative tweets used for training and evaluating the sentiment analysis model.
A Logistic Regression model is implemented from scratch to classify the sentiment of the tweets. The model is trained using the preprocessed tweet data and then used to predict the sentiment of new tweets.
- Data Preparation: Ensure you have the
nltklibrary installed. Download thetwitter_samplesdataset fromnltk.corpususing the following code:import nltk nltk.download('twitter_samples') nltk.download('stopwords')
- Model Training: Run the provided Jupyter notebook to preprocess the data and train the Logistic Regression model.
- Prediction: Use the trained model to predict the sentiment of new tweets.
- Model Evaluation: Evaluate the performance of the model using metrics such as accuracy.
The project aims to achieve accurate sentiment classification of tweets. The results include performance metrics and test examples to evaluate the model's performance.
Unnati Agarwal