File size: 3,069 Bytes
67f9ee9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a9e5ab7
67f9ee9
 
 
 
 
a9e5ab7
 
 
 
 
 
67f9ee9
a9e5ab7
 
 
67f9ee9
a9e5ab7
 
 
67f9ee9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
library_name: transformers
license: apache-2.0
base_model: distilbert-base-uncased
tags:
- generated_from_trainer
metrics:
- accuracy
- f1
model-index:
- name: distilbert-base-uncased_finetuned_on_emotions_data
  results: []
---

<!-- 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. -->

# distilbert-base-uncased_finetuned_on_emotions_data

This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1561
- Accuracy: 0.933
- F1: 0.9328

## Model description

his model is designed to analyze text and classify it into different emotional categories, such as joy, sadness, anger, etc. It has been trained on a dataset specifically labeled with emotions, allowing it to identify the emotional tone of the input text. The model works by processing the text and predicting which emotion best fits the given context

## Intended uses & limitations

More information needed

## limitations
- still this model is confused between fear and anger he model may confuse "fear" and "anger" because both emotions can be expressed in similar ways, especially in situations involving frustration, stress, or danger. Additionally, the language used to express these emotions might overlap, such as words like "nervous," "frustrated," or "threatened," which can be interpreted as either fear or anger depending on the context. This overlap in linguistic cues can make it challenging for the model to distinguish between the two emotions., joy & love
- similarely for love & Joy
  
![image/png](https://cdn-uploads.huggingface.co/production/uploads/673b3bb18ad55753067c0159/XXcil4Db3y9NgubwY3ecm.png)

## Training and evaluation data
I've used emotion data available on huggingface 
Training data: emotion['train']
evaluation data: emotion['evaluation']

## confusion matrix:

![image/png](https://cdn-uploads.huggingface.co/production/uploads/673b3bb18ad55753067c0159/Ny67eKNot-4Xir3lvtOoY.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: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 4

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.7824        | 1.0   | 250  | 0.2717          | 0.9145   | 0.9149 |
| 0.2093        | 2.0   | 500  | 0.1788          | 0.93     | 0.9306 |
| 0.1379        | 3.0   | 750  | 0.1594          | 0.9345   | 0.9349 |
| 0.1106        | 4.0   | 1000 | 0.1561          | 0.933    | 0.9328 |


### Framework versions

- Transformers 4.47.1
- Pytorch 2.5.1+cu121
- Datasets 3.2.0
- Tokenizers 0.21.0