Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gauravkaklotar/emotions_analysis
Emotions Analysis
https://github.com/gauravkaklotar/emotions_analysis
data-analyst flask-api ml nlkt python3 reactjs tailwindcss
Last synced: about 2 months ago
JSON representation
Emotions Analysis
- Host: GitHub
- URL: https://github.com/gauravkaklotar/emotions_analysis
- Owner: GauravKaklotar
- License: mit
- Created: 2024-08-12T06:47:17.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T11:31:04.000Z (6 months ago)
- Last Synced: 2024-11-08T17:49:11.543Z (3 months ago)
- Topics: data-analyst, flask-api, ml, nlkt, python3, reactjs, tailwindcss
- Language: Jupyter Notebook
- Homepage:
- Size: 18.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Emotion Detection from Text
This project focuses on classifying emotions in Twitter text data into six categories: sadness, joy, love, anger, fear, and surprise. The dataset consists of Twitter messages, each labeled with one of these emotions.
## Project Overview
1. **Data Preprocessing**:
- Loaded the Twitter text dataset and performed text cleaning.
- Removed URLs, mentions, hashtags, and special characters from the text.
- Tokenized and normalized the text for consistent analysis.2. **Exploratory Data Analysis (EDA)**:
- Analyzed the distribution of emotions in the dataset.
- Examined the length of text segments to understand the data structure.
- Generated visualizations, including bar plots and histograms, to gain insights into the dataset.3. **Model Selection and Training**:
- Chose Logistic Regression for initial model training.
- Vectorized the text data using TF-IDF to convert it into numerical features.
- Split the dataset into training and testing sets with an 80/20 ratio.
- Trained the model on the training data and evaluated its performance.4. **Model Evaluation**:
- Assessed the model using accuracy, precision, recall, and F1-score metrics.
- Generated a classification report to evaluate the performance across different emotion categories.
- Created a confusion matrix to visualize the model’s prediction accuracy.5. **Model Improvement**:
- Performed hyperparameter tuning using Grid Search to optimize the Logistic Regression model.
- Validated the model using cross-validation to ensure it generalizes well to unseen data.