
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# NLP-reviews

This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the [Sentiment Labelled Sentences Data Set](https://archive.ics.uci.edu/ml/datasets/Sentiment+Labelled+Sentences). 

## Model description

Given a sentence, this model will return the probabilities of it having a positive or negative sentiment, and the probabilities that it would be a review you would find from amazon.com, imdb.com, or yelp.com.

It is a multi-label classification model which is able to determine both the sentiment of text and a grouping the text belongs to.

## Training and evaluation data

The data is obtained from the procured [Sentiment Labelled Sentences Data Set](https://archive.ics.uci.edu/ml/datasets/Sentiment+Labelled+Sentences).

Each entry has a sentiment score: 1 for positive or 0 for negative.

The data comes from one of three different websites:
- amazon.com
- imdb.com
- yelp.com

There are 500 positive and 500 negative sentences from each website, selected randomly from a larger dataset of reviews, and were chosen based on having clear positive or negative connotation. 

This was split into a 90-10 train-test split for model training and evaluation.

The code used to train the model is at https://github.com/josephtkim/huggingface-sentiment-analysis.

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 10

### Training results

| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| No log        | 1.0   | 338  | 0.2270          |
| 0.2235        | 2.0   | 676  | 0.2737          |
| 0.0644        | 3.0   | 1014 | 0.3171          |
| 0.0644        | 4.0   | 1352 | 0.3511          |
| 0.0193        | 5.0   | 1690 | 0.3726          |
| 0.0119        | 6.0   | 2028 | 0.3638          |
| 0.0119        | 7.0   | 2366 | 0.3337          |
| 0.0043        | 8.0   | 2704 | 0.3424          |
| 0.0019        | 9.0   | 3042 | 0.3387          |
| 0.0019        | 10.0  | 3380 | 0.3467          |


### Framework versions

- Transformers 4.29.1
- Pytorch 2.0.0+cu118
- Datasets 2.12.0
- Tokenizers 0.13.3

{"license": "apache-2.0", "tags": ["generated_from_trainer"], "widget": [{"text": "Items arrived with missing pieces"}, {"text": "The restaurant was clean and the food delicious"}, {"text": "The movie was a masterpiece"}], "model-index": [{"name": "NLP-reviews", "results": []}]}
transformers pytorch tensorboard safetensors bert text-classification generated_from_trainer license:apache-2.0 autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #tensorboard #safetensors #bert #text-classification #generated_from_trainer #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 

NLP-reviews
===========


This model is a fine-tuned version of bert-base-uncased on the Sentiment Labelled Sentences Data Set.


Model description
-----------------


Given a sentence, this model will return the probabilities of it having a positive or negative sentiment, and the probabilities that it would be a review you would find from URL, URL, or URL.


It is a multi-label classification model which is able to determine both the sentiment of text and a grouping the text belongs to.


Training and evaluation data
----------------------------


The data is obtained from the procured Sentiment Labelled Sentences Data Set.


Each entry has a sentiment score: 1 for positive or 0 for negative.


The data comes from one of three different websites:


* URL
* URL
* URL


There are 500 positive and 500 negative sentences from each website, selected randomly from a larger dataset of reviews, and were chosen based on having clear positive or negative connotation.


This was split into a 90-10 train-test split for model training and evaluation.


The code used to train the model is at URL


Training procedure
------------------


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 5e-05
* train\_batch\_size: 8
* eval\_batch\_size: 8
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 10


### Training results



### Framework versions


* Transformers 4.29.1
* Pytorch 2.0.0+cu118
* Datasets 2.12.0
* Tokenizers 0.13.3



### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 5e-05
* train\_batch\_size: 8
* eval\_batch\_size: 8
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 10 ### Training results ### Framework versions


* Transformers 4.29.1
* Pytorch 2.0.0+cu118
* Datasets 2.12.0
* Tokenizers 0.13.3
TAGS
#transformers #pytorch #tensorboard #safetensors #bert #text-classification #generated_from_trainer #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 5e-05
* train\_batch\_size: 8
* eval\_batch\_size: 8
* seed: 42
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 10 ### Training results ### Framework versions


* Transformers 4.29.1
* Pytorch 2.0.0+cu118
* Datasets 2.12.0
* Tokenizers 0.13.3