
# distilbert-base-uncased-OnionOrNot

This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2039
- Accuracy: 0.9224
- F1: 0.9218

## Model description

This is a binary classification model to determine if the input sample is an onion news title or not.

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Binary%20Classification/OnionOrNot/DunnBC22-distilbert-base-uncased-OnionOrNot.ipynb

## Intended uses & limitations

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

The main limitation is the quality of the data source.

## Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/chrisfilo/onion-or-not

_Input Word Length By Class:_

![Input Length in Words By Class](https://github.com/DunnBC22/NLP_Projects/raw/main/Binary%20Classification/OnionOrNot/Images/Input%20Word%20length%20by%20Class.png)

_Confusion Matrix:_

![Confusion Matrix](https://github.com/DunnBC22/NLP_Projects/raw/main/Binary%20Classification/OnionOrNot/Images/Confusion%20Matrix.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: 2

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.3334        | 1.0   | 300  | 0.2382          | 0.9024   | 0.9011 |
| 0.1822        | 2.0   | 600  | 0.2039          | 0.9224   | 0.9218 |

### Framework versions

- Transformers 4.21.1
- Pytorch 1.12.1
- Datasets 2.4.0
- Tokenizers 0.12.1
{"language": ["en"], "license": "apache-2.0", "tags": ["generated_from_trainer"], "metrics": ["accuracy", "f1"], "model-index": [{"name": "distilbert-base-uncased-OnionOrNot", "results": []}]}
transformers pytorch tensorboard distilbert text-classification generated_from_trainer en license:apache-2.0 autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #tensorboard #distilbert #text-classification #generated_from_trainer #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 

distilbert-base-uncased-OnionOrNot
==================================


This model is a fine-tuned version of distilbert-base-uncased on the None dataset.
It achieves the following results on the evaluation set:


* Loss: 0.2039
* Accuracy: 0.9224
* F1: 0.9218


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


This is a binary classification model to determine if the input sample is an onion news title or not.


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


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


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


The main limitation is the quality of the data source.


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


Dataset Source: URL


*Input Word Length By Class:*


!Input Length in Words By Class


*Confusion Matrix:*


!Confusion Matrix


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: 2


### Training results



### Framework versions


* Transformers 4.21.1
* Pytorch 1.12.1
* Datasets 2.4.0
* Tokenizers 0.12.1



### 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: 2 ### Training results ### Framework versions


* Transformers 4.21.1
* Pytorch 1.12.1
* Datasets 2.4.0
* Tokenizers 0.12.1
TAGS
#transformers #pytorch #tensorboard #distilbert #text-classification #generated_from_trainer #en #license-apache-2.0 #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: 2 ### Training results ### Framework versions


* Transformers 4.21.1
* Pytorch 1.12.1
* Datasets 2.4.0
* Tokenizers 0.12.1
passage: TAGS
#transformers #pytorch #tensorboard #distilbert #text-classification #generated_from_trainer #en #license-apache-2.0 #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: 2### Training results### Framework versions


* Transformers 4.21.1
* Pytorch 1.12.1
* Datasets 2.4.0
* Tokenizers 0.12.1