File size: 3,525 Bytes
b1032a0
 
 
 
 
d1d6a63
 
b1032a0
 
 
d1d6a63
 
 
 
 
 
 
b1032a0
d1d6a63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b1032a0
 
 
 
 
d1d6a63
b1032a0
d1d6a63
b1032a0
d1d6a63
 
 
b1032a0
 
 
d1d6a63
 
b1032a0
 
 
d1d6a63
 
 
 
 
 
 
 
b1032a0
 
d1d6a63
b1032a0
d1d6a63
 
 
 
 
 
 
b1032a0
 
 
 
 
 
 
 
 
 
 
 
d1d6a63
b1032a0
 
 
 
 
d1d6a63
 
 
 
 
 
 
 
 
 
b1032a0
 
 
 
d1d6a63
 
 
 
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
license: apache-2.0
base_model: distilbert-base-uncased
tags:
- generated_from_trainer
datasets:
- emotion
metrics:
- accuracy
- f1
widget:
- text: on a boat trip to denmark
  example_title: Example 1
- text: i was feeling listless from the need of new things something different
  example_title: Example 2
- text: i know im feeling agitated as it is from a side effect of the too high dose
  example_title: Example 3
model-index:
- name: distilbert-base-uncased-finetuned-emotions-dataset
  results:
  - task:
      name: Text Classification
      type: text-classification
    dataset:
      name: emotion
      type: emotion
      config: split
      split: validation
      args: split
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9395
    - name: F1
      type: f1
      value: 0.9396359245863207
pipeline_tag: text-classification
language:
- en
library_name: transformers
---

<!-- 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-emotions-dataset

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

## Model description

The model has been trained to classify text inputs into distinct emotional categories based on the fine-tuned understanding of the emotions dataset. 
The fine-tuned model has demonstrated high accuracy and F1 scores on the evaluation set.

## Intended uses & limitations

#### Intended Uses
- Sentiment analysis
- Emotional classification in text
- Emotion-based recommendation systems

#### Limitations
- May show biases based on the training dataset
- Optimized for emotional classification and may not cover nuanced emotional subtleties

## Training and evaluation data
Emotions dataset with labeled emotional categories [here](https://huggingface.co/datasets/dair-ai/emotion).

#### The emotional categories are as follows:
- LABEL_0: sadness 
- LABEL_1: joy
- LABEL_2: love
- LABEL_3: anger
- LABEL_4: fear
- LABEL_5: surprise

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 32
- eval_batch_size: 32
- 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 | Accuracy | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.5929        | 1.0   | 500  | 0.2345          | 0.9185   | 0.9180 |
| 0.1642        | 2.0   | 1000 | 0.1716          | 0.9335   | 0.9342 |
| 0.1163        | 3.0   | 1500 | 0.1501          | 0.9405   | 0.9407 |
| 0.0911        | 4.0   | 2000 | 0.1698          | 0.933    | 0.9331 |
| 0.0741        | 5.0   | 2500 | 0.1926          | 0.932    | 0.9323 |
| 0.0559        | 6.0   | 3000 | 0.2033          | 0.935    | 0.9353 |
| 0.0464        | 7.0   | 3500 | 0.2156          | 0.935    | 0.9353 |
| 0.0335        | 8.0   | 4000 | 0.2354          | 0.9405   | 0.9408 |
| 0.0257        | 9.0   | 4500 | 0.2410          | 0.9395   | 0.9396 |
| 0.0214        | 10.0  | 5000 | 0.2428          | 0.9395   | 0.9396 |


### Framework versions

- Transformers 4.35.2
- Pytorch 2.1.0+cu118
- Datasets 2.15.0
- Tokenizers 0.15.0