File size: 1,291 Bytes
95c61d3
 
 
 
 
 
 
 
 
 
 
b73f1e8
 
 
 
d615307
f8a5428
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- en
metrics:
- accuracy
- f1
- precision
- recall
base_model:
- distilbert/distilbert-base-uncased-finetuned-sst-2-english
pipeline_tag: text-classification
tags:
- fake
- real
- news
library_name: transformers
---

# DistilBERT Fake News Classifier

## Model Description
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%).

## Training Performance
| Epoch | Training Loss | Validation Loss | Accuracy | F1 Score |
|-------|---------------|-----------------|----------|----------|
| 1     | -             | 0.1115          | 96.08%   | 96.09%   |
| 2     | 0.2026        | 0.1077          | 97.25%   | 97.28%   |
| 3     | 0.0647        | 0.1119          | 97.45%   | 97.50%   |

## Final Test Results
| Metric     | Score  |
|------------|--------|
| Accuracy   | 97.18% |
| F1 Score   | 97.23% |
| Precision  | 97.17% |
| Recall     | 97.30% |

## Usage
```python
from transformers import pipeline

classifier = pipeline("text-classification", 
                    model="KenLumod/ML-Project-DistilBERT-Fake-and-Real-Classifier")
result = classifier("Scientists confirm climate change accelerating beyond previous estimates")
# Output: {'label': 'REAL', 'score': 0.982}