File size: 2,829 Bytes
ffda5ff 3b007e2 fe5d53f 3b007e2 dc7f477 3b007e2 dc7f477 3b007e2 dc7f477 3b007e2 dc7f477 3b007e2 fe5d53f ffda5ff 809af7d e0e460d 809af7d ffda5ff dc7f477 ffda5ff 809af7d c8b50fe 809af7d |
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 |
---
license: apache-2.0
datasets:
- dair-ai/emotion
language:
- en
metrics:
- accuracy
- f1
- precision
- recall
base_model:
- albert/albert-large-v2
pipeline_tag: text-classification
model-index:
- name: SandeepVvigneshwar/sentiment-classification-albert-large-v2
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: emotion
type: huggingface
config: default
split: test
metrics:
- type: accuracy
value: 0.9415
name: Accuracy
- type: precision
value: 0.9490
name: Precision
- type: recall
value: 0.9415
name: Recall
- type: f1
value: 0.9425
name: F1
---
# Sentiment classification using Albert-large-v2
### Model Description
This model is a fine-tuned version of the ALBERT-Large model designed for **emotion sentiment classification**, capable of detecting six different emotional categories in text: **Anger**, **Disgust**, **Fear**, **Happiness**, **Sadness**, and **Surprise**. It achieves high performance on sentiment classification tasks, making it suitable for a variety of real-world applications such as emotion detection, content moderation, and sentiment analysis.
## Evaluation
| Metric | Value |
|----------------------------|--------|
| **Evaluation Loss** | 0.08795 |
| **Evaluation Accuracy** | 94.15% |
| **Evaluation Precision** | 94.90% |
| **Evaluation Recall** | 94.15% |
| **Evaluation F1-Score** | 94.25% |
## How to Get Started
Use the code below to get started with the model.
```python
from transformers import pipeline
emotion_classifier = pipeline("text-classification", model="SandeepVvigneshwar/sentiment-classification-albert-large-v2")
text = "Hello! How are you?"
emotion = emotion_classifier(text)
print(emotion)
```
## Requirements
- Python 3.x
- Hugging Face `transformers` library
- PyTorch or TensorFlow
### Training Data
[dair-ai/emotion](https://huggingface.co/datasets/dair-ai/emotion)
#### Training Hyperparameters
- learning_rate = 2e-5
- per_device_train_batch_size = 8
- per_device_eval_batch_size = 8
- gradient_accumulation_steps = 2
- num_train_epochs = 8
- weight_decay = 0.01
- fp16 = True
- metric_for_best_model = "f1"
- dataloader_num_workers = 4
- max_grad_norm = 1.0
- lr_scheduler_type = "linear"
### Limits
- Domain-specific Text: The model may not perform well on specialized or highly technical texts.
- Languages: The model has been fine-tuned on English-language data and may not generalize well to other languages.
- Input Length: The model performs best with shorter text inputs. For longer, more complex texts, performance may vary.
|