Update README.md
Browse files
README.md
CHANGED
@@ -13,7 +13,34 @@ tags:
|
|
13 |
- fake
|
14 |
- real
|
15 |
- news
|
16 |
-
datasets:
|
17 |
-
- Reyansh4/Fake-News-Classification
|
18 |
library_name: transformers
|
19 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
- fake
|
14 |
- real
|
15 |
- news
|
|
|
|
|
16 |
library_name: transformers
|
17 |
+
---
|
18 |
+
|
19 |
+
# DistilBERT Fake News Classifier
|
20 |
+
|
21 |
+
## Model Description
|
22 |
+
This DistilBERT-based model achieves **97.18% accuracy** in classifying news articles as real or fake, with balanced precision (97.17%) and recall (97.30%).
|
23 |
+
|
24 |
+
## Training Performance
|
25 |
+
| Epoch | Training Loss | Validation Loss | Accuracy | F1 Score |
|
26 |
+
|-------|---------------|-----------------|----------|----------|
|
27 |
+
| 1 | - | 0.1115 | 96.08% | 96.09% |
|
28 |
+
| 2 | 0.2026 | 0.1077 | 97.25% | 97.28% |
|
29 |
+
| 3 | 0.0647 | 0.1119 | 97.45% | 97.50% |
|
30 |
+
|
31 |
+
## Final Test Results
|
32 |
+
| Metric | Score |
|
33 |
+
|------------|--------|
|
34 |
+
| Accuracy | 97.18% |
|
35 |
+
| F1 Score | 97.23% |
|
36 |
+
| Precision | 97.17% |
|
37 |
+
| Recall | 97.30% |
|
38 |
+
|
39 |
+
## Usage
|
40 |
+
```python
|
41 |
+
from transformers import pipeline
|
42 |
+
|
43 |
+
classifier = pipeline("text-classification",
|
44 |
+
model="KenLumod/ML-Project-DistilBERT-Fake-and-Real-Classifier")
|
45 |
+
result = classifier("Scientists confirm climate change accelerating beyond previous estimates")
|
46 |
+
# Output: {'label': 'REAL', 'score': 0.982}
|