Instructions to use lmoody68/leads-doctype-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use lmoody68/leads-doctype-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("lmoody68/leads-doctype-classifier", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Upload metrics.json with huggingface_hub
Browse files- metrics.json +94 -0
metrics.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "LogisticRegression head on MiniLM-L6 (384-d) sentence embeddings",
|
| 3 |
+
"task": "document doc_type classification (auxiliary metadata tagger)",
|
| 4 |
+
"label_field": "doc_type",
|
| 5 |
+
"classes": [
|
| 6 |
+
"bill",
|
| 7 |
+
"opinion",
|
| 8 |
+
"regulation",
|
| 9 |
+
"statute"
|
| 10 |
+
],
|
| 11 |
+
"n_samples": 3137,
|
| 12 |
+
"n_features": 384,
|
| 13 |
+
"holdout": {
|
| 14 |
+
"test_size": 0.2,
|
| 15 |
+
"accuracy": 0.9252,
|
| 16 |
+
"macro_f1": 0.897
|
| 17 |
+
},
|
| 18 |
+
"cross_val": {
|
| 19 |
+
"folds": 5,
|
| 20 |
+
"macro_f1_mean": 0.8091,
|
| 21 |
+
"macro_f1_std": 0.1075
|
| 22 |
+
},
|
| 23 |
+
"per_class": {
|
| 24 |
+
"bill": {
|
| 25 |
+
"precision": 0.929,
|
| 26 |
+
"recall": 0.929,
|
| 27 |
+
"f1": 0.929,
|
| 28 |
+
"support": 14,
|
| 29 |
+
"train_count": 70
|
| 30 |
+
},
|
| 31 |
+
"opinion": {
|
| 32 |
+
"precision": 0.673,
|
| 33 |
+
"recall": 0.946,
|
| 34 |
+
"f1": 0.787,
|
| 35 |
+
"support": 37,
|
| 36 |
+
"train_count": 187
|
| 37 |
+
},
|
| 38 |
+
"regulation": {
|
| 39 |
+
"precision": 0.945,
|
| 40 |
+
"recall": 0.922,
|
| 41 |
+
"f1": 0.933,
|
| 42 |
+
"support": 334,
|
| 43 |
+
"train_count": 1667
|
| 44 |
+
},
|
| 45 |
+
"statute": {
|
| 46 |
+
"precision": 0.953,
|
| 47 |
+
"recall": 0.926,
|
| 48 |
+
"f1": 0.939,
|
| 49 |
+
"support": 243,
|
| 50 |
+
"train_count": 1213
|
| 51 |
+
}
|
| 52 |
+
},
|
| 53 |
+
"confusion": {
|
| 54 |
+
"labels": [
|
| 55 |
+
"bill",
|
| 56 |
+
"opinion",
|
| 57 |
+
"regulation",
|
| 58 |
+
"statute"
|
| 59 |
+
],
|
| 60 |
+
"matrix": [
|
| 61 |
+
[
|
| 62 |
+
13,
|
| 63 |
+
0,
|
| 64 |
+
1,
|
| 65 |
+
0
|
| 66 |
+
],
|
| 67 |
+
[
|
| 68 |
+
0,
|
| 69 |
+
35,
|
| 70 |
+
2,
|
| 71 |
+
0
|
| 72 |
+
],
|
| 73 |
+
[
|
| 74 |
+
1,
|
| 75 |
+
14,
|
| 76 |
+
308,
|
| 77 |
+
11
|
| 78 |
+
],
|
| 79 |
+
[
|
| 80 |
+
0,
|
| 81 |
+
3,
|
| 82 |
+
15,
|
| 83 |
+
225
|
| 84 |
+
]
|
| 85 |
+
]
|
| 86 |
+
},
|
| 87 |
+
"excluded_classes": {
|
| 88 |
+
"docket": 12,
|
| 89 |
+
"statistic": 8
|
| 90 |
+
},
|
| 91 |
+
"min_per_class": 20,
|
| 92 |
+
"trained_at": "2026-06-14T18:45:53+00:00",
|
| 93 |
+
"disclaimer": "Auxiliary document-TYPE tagger trained on public legal text. NOT legal advice and NOT a model of the law."
|
| 94 |
+
}
|