Views
No views yet
sentence-transformers/all-MiniLM-L6-v2 embeddings (384-d, ONNX — no torch).LogisticRegression (class_weight="balanced").| Metric | Value |
|---|---|
| Held-out accuracy | 0.9252 |
| Held-out macro-F1 | 0.897 |
| 5-fold CV macro-F1 | 0.8091 ± 0.1075 |
| class | precision | recall | F1 | test support |
|---|---|---|---|---|
| bill | 0.929 | 0.929 | 0.929 | 14 |
| opinion | 0.673 | 0.946 | 0.787 | 37 |
| regulation | 0.945 | 0.922 | 0.933 | 334 |
| statute | 0.953 | 0.926 | 0.939 | 243 |
1import joblib, numpy as np
2from huggingface_hub import hf_hub_download
3from sentence_transformers import SentenceTransformer # or any all-MiniLM-L6-v2 encoder
4
5clf = joblib.load(hf_hub_download("lmoody68/leads-doctype-classifier", "doctype_clf.joblib"))
6enc = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
7X = enc.encode(["The debt collector shall not communicate with third parties..."])
8print(clf.predict(np.asarray(X)))