Downloads · 30 days
17
100% of all-time downloads
yhile-com/yhile-spam-lr-v1
yhile-spam-lr-v1 is a text classification model from yhile-com. Use it when you need a label for a piece of text. The card lists the license as mit.
A logistic regression classifier that detects spam, phishing, and crypto scam messages (including giveaway scams, pig-butchering/investment scams, and wallet phishing). Built with scikit-learn using TF-IDF text featur…
Downloads · 30 days
17
100% of all-time downloads
All-time downloads
17
Public
Repo size
9 MB
Likes
1
Public
Click a slice to open those files.
.skops9 MB · 100%
From the Hugging Face model README
A logistic regression classifier that detects spam, phishing, and crypto scam messages (including giveaway scams, pig-butchering/investment scams, and wallet phishing). Built with scikit-learn using TF-IDF text features combined with hand-engineered structural and keyword features.
This README was written with AI assistance.
Combined and deduplicated from three public datasets, plus a small handcrafted supplement:
| Source | Rows (approx.) | License / notes |
|---|---|---|
| SMS Spam Collection | 5,572 | CC BY 4.0 (Almeida et al.) |
| Enron-Spam dataset | ~30,000 | Publicly released via FERC proceedings; contains real personal correspondence |
| SpamAssassin Public Corpus | ~6,000 | Apache-released for spam filter testing |
| Handcrafted examples | ~65 | Written to cover pig-butchering scam patterns and matching legitimate ("caution language") ham not well represented in the public datasets |
Final combined dataset: ~41,000 rows (~59% ham / 41% spam) after HTML stripping, boilerplate removal, and deduplication.
Evaluated on a held-out 20% stratified test split (~8,235 rows):
The classification threshold was tuned for ≥95% precision on the spam class rather than using the default 0.5 cutoff, to reduce false positives.
from skops.io import load, get_untrusted_types
untrusted = get_untrusted_types(file="yhile-spam-lr-v1.skops")
saved = load("yhile-spam-lr-v1.skops", trusted=untrusted)
model = saved["model"]
word_vectorizer = saved["word_vectorizer"]
char_vectorizer = saved["char_vectorizer"]
threshold = saved["threshold"]
# see train.py for the full extract_features() implementation used at
# both training and inference time — the two must stay in sync
The full training pipeline, feature engineering, and text cleaning code is
included as train.py in this repository for transparency.
The Enron-Spam dataset contains real people's private email correspondence, released publicly through legal proceedings rather than by consent of the individuals involved. It is included here as it is widely used for spam research, but this context is worth being aware of.
If you use the SMS Spam Collection portion of this training data, please cite:
Almeida, T.A., Gómez Hidalgo, J.M., Yamakami, A. Contributions to the study of SMS Spam Filtering: New Collection and Results. 2011.