File size: 1,711 Bytes
338b25d
8e9cc8d
 
0b5957a
 
 
 
 
 
 
 
 
 
 
 
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
 
 
 
 
338b25d
0b5957a
 
 
 
 
338b25d
0b5957a
338b25d
0b5957a
 
 
338b25d
0b5957a
 
 
 
338b25d
0b5957a
 
 
 
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
 
 
 
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
 
 
 
 
 
338b25d
0b5957a
338b25d
0b5957a
338b25d
0b5957a
 
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
---
language:
- en
license: mit
tags:
- text-classification
- sentiment-analysis
- distilbert
- amazon-reviews
- nlp
datasets:
- amazon_polarity
metrics:
- accuracy
- f1
---
# πŸ›οΈ pranalyzer β€” Sentiment Analysis Model

Fine-tuned **DistilBERT** on Amazon product reviews for binary sentiment classification (POSITIVE / NEGATIVE).

Part of the [pranalyzer](https://github.com/Vedant-Nagarkar/product-review-analyzer) end-to-end NLP pipeline.

---

## πŸ“Š Model Performance

| Metric | Score |
|---|---|
| Accuracy | 93.00% |
| F1 Score | 0.9299 |
| Loss | 0.1923 |

- **Dataset**: `amazon_polarity` (5,000 train / 1,000 test samples)
- **Hardware**: T4 GPU (Google Colab)
- **Epochs**: 3
- **Batch size**: 32
- **Learning rate**: 2e-5

---

## πŸš€ Quick Start
```python
from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="Ved2001/pranalyzer"
)

result = classifier("This product is absolutely amazing!")
print(result)
# [{'label': 'POSITIVE', 'score': 0.98}]
```

---

## πŸ‹οΈ Training Details

**Base model**: `distilbert-base-uncased`  
**Task**: Binary sentiment classification  
**Labels**: `NEGATIVE (0)`, `POSITIVE (1)`  
**Dataset**: Amazon Polarity β€” 3.6M reviews (sampled 5K for fine-tuning)

---

## πŸ” Part of pranalyzer Pipeline

This model is the sentiment component of a 4-model pipeline:

| Task | Model |
|---|---|
| **Sentiment** | `Ved2001/pranalyzer` (this model) |
| Category | `facebook/bart-large-mnli` |
| Aspects | `cross-encoder/nli-roberta-base` |
| Summary | `facebook/bart-large-xsum` |

---

## πŸ‘€ Author

**Vedant Nagarkar**  
[GitHub](https://github.com/Vedant-Nagarkar) β€’ [HuggingFace](https://huggingface.co/Ved2001)