uvegesistvan
commited on
Commit
•
dafc357
1
Parent(s):
fdcd841
Update README.md
Browse filesmodel card created
README.md
CHANGED
@@ -1,3 +1,94 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- sk
|
4 |
+
tags:
|
5 |
+
- emotion-classification
|
6 |
+
- roberta
|
7 |
+
- fine-tuned
|
8 |
+
- slovak
|
9 |
+
|
10 |
+
license: mit
|
11 |
+
datasets:
|
12 |
+
- custom
|
13 |
+
|
14 |
+
model-index:
|
15 |
+
- name: Fine-tuned RoBERTa for Emotion Classification in Slovak
|
16 |
+
results:
|
17 |
+
- task:
|
18 |
+
type: text-classification
|
19 |
+
name: Emotion Classification in Slovak
|
20 |
+
dataset:
|
21 |
+
name: Slovak Custom Dataset
|
22 |
+
type: text
|
23 |
+
metrics:
|
24 |
+
- name: Precision (Macro Avg)
|
25 |
+
type: precision
|
26 |
+
value: 0.84
|
27 |
+
- name: Recall (Macro Avg)
|
28 |
+
type: recall
|
29 |
+
value: 0.84
|
30 |
+
- name: F1 Score (Macro Avg)
|
31 |
+
type: f1
|
32 |
+
value: 0.84
|
33 |
+
- name: Accuracy
|
34 |
+
type: accuracy
|
35 |
+
value: 0.81
|
36 |
+
|
37 |
+
---
|
38 |
+
|
39 |
+
# Fine-tuned RoBERTa Model for Emotion Classification in Slovak
|
40 |
+
|
41 |
+
## Model Description
|
42 |
+
This model is a fine-tuned version of the [RoBERTa](https://huggingface.co/roberta-base) model, specifically tailored for emotion classification tasks in Slovak.
|
43 |
+
The model was trained to classify textual data into six emotional categories (**anger, fear, disgust, sadness, joy,** and **none of them**).
|
44 |
+
|
45 |
+
## Intended Use
|
46 |
+
This model is intended for classifying textual data into emotional categories in the Slovak language.
|
47 |
+
It can be used in applications such as sentiment analysis, social media monitoring, customer feedback analysis, and similar tasks.
|
48 |
+
The model predicts the dominant emotion in a given text among the six predefined categories.
|
49 |
+
|
50 |
+
## Metrics
|
51 |
+
|
52 |
+
| **Class** | **Precision (P)** | **Recall (R)** | **F1-Score (F1)** |
|
53 |
+
|-----------------|-------------------|----------------|-------------------|
|
54 |
+
| **anger** | 0.70 | 0.77 | 0.73 |
|
55 |
+
| **fear** | 0.94 | 0.99 | 0.97 |
|
56 |
+
| **disgust** | 0.93 | 0.95 | 0.94 |
|
57 |
+
| **sadness** | 0.88 | 0.83 | 0.85 |
|
58 |
+
| **joy** | 0.89 | 0.86 | 0.88 |
|
59 |
+
| **none of them**| 0.72 | 0.65 | 0.69 |
|
60 |
+
| **Accuracy** | | | **0.81** |
|
61 |
+
| **Macro Avg** | 0.84 | 0.84 | 0.84 |
|
62 |
+
| **Weighted Avg**| 0.81 | 0.81 | 0.81 |
|
63 |
+
|
64 |
+
### Overall Performance
|
65 |
+
- **Accuracy:** 0.81
|
66 |
+
- **Macro Average Precision:** 0.84
|
67 |
+
- **Macro Average Recall:** 0.84
|
68 |
+
- **Macro Average F1-Score:** 0.84
|
69 |
+
|
70 |
+
### Class-wise Performance
|
71 |
+
The model demonstrates strong performance in the **fear**, **disgust**, and **joy** categories, with particularly high precision, recall, and F1 scores.
|
72 |
+
The model performs moderately well in detecting **anger** and **none of them** categories, indicating potential areas for improvement.
|
73 |
+
|
74 |
+
## Limitations
|
75 |
+
- **Context Sensitivity:** The model may struggle with recognizing emotions that require deeper contextual understanding.
|
76 |
+
- **Class Imbalance:** The model's performance on the "none of them" category suggests that further training with more balanced datasets could improve accuracy.
|
77 |
+
- **Generalization:** The model's performance may vary depending on the text's domain, language style, and length, especially across different languages.
|
78 |
+
|
79 |
+
## Training Data
|
80 |
+
The model was fine-tuned on a custom Slovak dataset containing textual samples labeled across six emotional categories.
|
81 |
+
The dataset's distribution was considered during training to ensure balanced performance across classes.
|
82 |
+
|
83 |
+
## How to Use
|
84 |
+
You can use this model directly with the `transformers` library from Hugging Face. Below is an example of how to load and use the model:
|
85 |
+
|
86 |
+
```python
|
87 |
+
from transformers import pipeline
|
88 |
+
|
89 |
+
# Load the fine-tuned model
|
90 |
+
classifier = pipeline("text-classification", model="visegradmedia-emotion/Emotion_RoBERTa_slovak6")
|
91 |
+
|
92 |
+
# Example usage
|
93 |
+
result = classifier("Cítim sa dnes veľmi šťastný!")
|
94 |
+
print(result)
|