Update README.md
Browse files
README.md
CHANGED
|
@@ -64,26 +64,35 @@ Such categorization supports **policy analysis, thematic mapping of central bank
|
|
| 64 |
* GPU: Tesla T4 (16GB)
|
| 65 |
* Framework: PyTorch 2.8.0 + Hugging Face Transformers
|
| 66 |
|
|
|
|
| 67 |
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
### Validation (10%)
|
| 71 |
|
| 72 |
-
|
| 73 |
-
* Macro-F1: **0.839**
|
| 74 |
-
* Weighted-F1: **0.852**
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
* Weighted-F1: **0.825**
|
| 81 |
|
| 82 |
-
|
|
|
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
* GPU: Tesla T4 (16GB)
|
| 65 |
* Framework: PyTorch 2.8.0 + Hugging Face Transformers
|
| 66 |
|
| 67 |
+
## Evaluation Results
|
| 68 |
|
| 69 |
+
| Split | Accuracy | Macro-F1 | Weighted-F1 | Class | Precision | Recall | F1 |
|
| 70 |
+
| ---------- | --------- | --------- | ----------- | ---------------- | --------- | ------ | ----- |
|
| 71 |
+
| Validation | **0.851** | **0.839** | **0.852** | – | – | – | – |
|
| 72 |
+
| Test | **0.823** | **0.803** | **0.825** | **Feature** | 0.759 | 0.782 | 0.770 |
|
| 73 |
+
| | | | | **Process** | 0.927 | 0.845 | 0.884 |
|
| 74 |
+
| | | | | **Risk-Benefit** | 0.700 | 0.817 | 0.754 |
|
| 75 |
|
|
|
|
| 76 |
|
| 77 |
+
---
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
## How to Use
|
| 80 |
|
| 81 |
+
```python
|
| 82 |
+
from transformers import pipeline
|
|
|
|
| 83 |
|
| 84 |
+
# Load pipeline
|
| 85 |
+
classifier = pipeline("text-classification", model="bilalzafar/CBDC-Discourse")
|
| 86 |
|
| 87 |
+
# Example sentences
|
| 88 |
+
sentences = [
|
| 89 |
+
"The central bank launched a pilot project for CBDC cross-border settlement.",
|
| 90 |
+
"Programmability in CBDC allows conditional payments.",
|
| 91 |
+
"CBDC may increase risks of bank disintermediation."
|
| 92 |
+
]
|
| 93 |
|
| 94 |
+
# Predict
|
| 95 |
+
for s in sentences:
|
| 96 |
+
result = classifier(s, return_all_scores=False)[0]
|
| 97 |
+
print(f"{s}\n → {result['label']} (score={result['score']:.4f})\n")
|
| 98 |
+
```
|