Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ArashST79 authored Dec 13, 2023
1 parent a2ecb33 commit 7e17507
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,45 @@
# sentiment_product
Certainly! Below is a template for a structured and informative README file for your sentiment analysis project. I've included sections on project overview, dataset, model fine-tuning, running evaluations, and additional notes. Please customize it further based on your specific project details.

---

# Sentiment Analysis of Customer Reviews

## Overview

This project focuses on sentiment analysis of customer reviews using machine learning techniques. The goal is to fine-tune various models on a customer review dataset, compare their performance, and evaluate pre-built models for sentiment analysis. The project is designed to be executed on CPU, utilizing low-size models for efficiency.

## Dataset

The dataset used for this project consists of approximately 20,000 customer comments. The labels assigned to each comment range from -0.9 to 0.9, reflecting a sentiment score. The sentiment scores are mapped to a classification scale resembling a star rating, ranging from 1 star to 5 stars.

## Model Fine-Tuning

### Fine-Tuned Model

The project employs the 'distilbert-base-uncased' model from Hugging Face as the base model for fine-tuning. This model is chosen for its lower size, making it suitable for training and testing on CPU.

To fine-tune the model, the sentiment labels are transformed into a classification task, converting the sentiment scores into star ratings. The fine-tuning process is implemented in the `evaluation.py` script, providing insights into the model's performance.

### Pre-Built Model

Additionally, a pre-built classification model, 'nlptown/bert-base-multilingual-uncased-sentiment,' is included in the evaluation process. This model is specifically fine-tuned for customer reviews.

## Running Evaluations

To evaluate the fine-tuned and pre-built models, run the `evaluation.py` script. This script generates confusion matrices for each model, facilitating a comparative analysis of their performance. The confusion matrices offer a visual representation of how well the models classify sentiments across different classes.

```bash
python evaluation.py
```

## Additional Notes

- Ensure that the required dependencies are installed. Refer to the `requirements.txt` file for details.
- The project is optimized for execution on CPU and utilizes smaller-sized models for efficiency.
- Customize hyperparameters, model architecture, or training settings as needed for your specific requirements.

Feel free to explore and experiment with different models and datasets to enhance the project's performance.

---

You can copy and paste this template into your README file and further modify it based on any additional information you'd like to include or specific details about your project.

0 comments on commit 7e17507

Please sign in to comment.