# mpnet-base-apple_iphone_se_reviews

This model is a fine-tuned version of [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base).

It achieves the following results on the evaluation set:
- Loss: 0.1299
- Accuracy: 0.9460
- F1
  - Weighted: 0.9360
  - Micro: 0.9460
  - Macro: 0.7242
- Recall
  - Weighted: 0.9460
  - Micro: 0.9460
  - Macro: 0.7594
- Precision
  - Weighted: 0.9290
  - Micro: 0.9460
  - Macro: 0.7007

## Model description

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Multiclass%20Classification/Apple%20iPhone%20SE%20Reviews/Apple%20IPhone%20Reviews%20-%20MC%20CLF%20-%20MPNet.ipynb

* I also completed a version of this project using the Bert-Base transformer.

## Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

## Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/kmldas/apple-iphone-se-reviews-ratings

_Input Word Length:_

![Length of Input Text (in Words)](https://github.com/DunnBC22/NLP_Projects/raw/main/Multiclass%20Classification/Apple%20iPhone%20SE%20Reviews/Images/Context%20Word%20Length.png)

_Class Distribution:_

![Class Distribution](https://github.com/DunnBC22/NLP_Projects/raw/main/Multiclass%20Classification/Apple%20iPhone%20SE%20Reviews/Images/Class%20Distribution.png)

## Training procedure

### Training hyperparameters

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

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Weighted F1 | Micro F1 | Macro F1 | Weighted Recall | Micro Recall | Macro Recall | Weighted Precision | Micro Precision | Macro Precision |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:--------:|:---------------:|:------------:|:------------:|:------------------:|:---------------:|:---------------:|
| 0.5194        | 1.0   | 122  | 0.4068          | 0.8327   | 0.7993      | 0.8327   | 0.3289   | 0.8327          | 0.8327       | 0.3855       | 0.7948             | 0.8327          | 0.3031          |
| 0.264         | 2.0   | 244  | 0.2357          | 0.8837   | 0.8645      | 0.8837   | 0.4560   | 0.8837          | 0.8837       | 0.5089       | 0.8530             | 0.8837          | 0.4341          |
| 0.1601        | 3.0   | 366  | 0.1647          | 0.8976   | 0.8774      | 0.8976   | 0.4863   | 0.8976          | 0.8976       | 0.5615       | 0.8697             | 0.8976          | 0.4610          |
| 0.1281        | 4.0   | 488  | 0.1398          | 0.9424   | 0.9323      | 0.9424   | 0.7093   | 0.9424          | 0.9424       | 0.7464       | 0.9244             | 0.9424          | 0.6806          |
| 0.1175        | 5.0   | 610  | 0.1299          | 0.9460   | 0.9360      | 0.9460   | 0.7242   | 0.9460          | 0.9460       | 0.7594       | 0.9290             | 0.9460          | 0.7007          |


### Framework versions

- Transformers 4.28.1
- Pytorch 2.0.0
- Datasets 2.11.0
- Tokenizers 0.13.3
{"language": ["en"], "tags": ["generated_from_trainer"], "metrics": ["accuracy", "f1", "recall", "precision"], "pipeline_tag": "text-classification", "model-index": [{"name": "mpnet-base-apple_iphone_se_reviews", "results": []}]}
transformers pytorch tensorboard mpnet text-classification generated_from_trainer en autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #tensorboard #mpnet #text-classification #generated_from_trainer #en #autotrain_compatible #endpoints_compatible #region-us 

mpnet-base-apple\_iphone\_se\_reviews
=====================================


This model is a fine-tuned version of microsoft/mpnet-base.


It achieves the following results on the evaluation set:


* Loss: 0.1299
* Accuracy: 0.9460
* F1
	+ Weighted: 0.9360
	+ Micro: 0.9460
	+ Macro: 0.7242
* Recall
	+ Weighted: 0.9460
	+ Micro: 0.9460
	+ Macro: 0.7594
* Precision
	+ Weighted: 0.9290
	+ Micro: 0.9460
	+ Macro: 0.7007


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


For more information on how it was created, check out the following link: URL


* I also completed a version of this project using the Bert-Base transformer.


Intended uses & limitations
---------------------------


This model is intended to demonstrate my ability to solve a complex problem using technology.


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


Dataset Source: URL


*Input Word Length:*


!Length of Input Text (in Words)


*Class Distribution:*


!Class Distribution


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


### Training hyperparameters


The following hyperparameters were used during training:


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


### Training results



### Framework versions


* Transformers 4.28.1
* Pytorch 2.0.0
* Datasets 2.11.0
* Tokenizers 0.13.3



### Training hyperparameters


The following hyperparameters were used during training:


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


* Transformers 4.28.1
* Pytorch 2.0.0
* Datasets 2.11.0
* Tokenizers 0.13.3
TAGS
#transformers #pytorch #tensorboard #mpnet #text-classification #generated_from_trainer #en #autotrain_compatible #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


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


* Transformers 4.28.1
* Pytorch 2.0.0
* Datasets 2.11.0
* Tokenizers 0.13.3