Text Classification
Scikit-learn
English
tfidf-logreg+urlflags
cybersecurity
security
phishing
malware
malicious-url
url-classification
explainable-ai
tfidf
logistic-regression
skops
Eval Results (legacy)
Instructions to use DaveyD347/malicious-url-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use DaveyD347/malicious-url-classifier with Scikit-learn:
# ⚠️ Model filename not specified in config.json
- Notebooks
- Google Colab
- Kaggle
Download config.json from DaveyD347/malicious-url-classifier: direct link, hf CLI and curl.
- Browser
- Download file 2.07 kB
-
https://huggingface.co/DaveyD347/malicious-url-classifier/resolve/main/config.json
- Command line
-
hf download hf://DaveyD347/malicious-url-classifier/config.json
-
curl -L -o config.json https://huggingface.co/DaveyD347/malicious-url-classifier/resolve/main/config.json
2.07 kB
| { | |
| "model_type": "tfidf-logreg+urlflags", | |
| "labels": [ | |
| "benign", | |
| "malicious" | |
| ], | |
| "threshold": 0.5, | |
| "oof_macro_f1_at_threshold": 0.9273, | |
| "char_vectorizer": { | |
| "analyzer": "char", | |
| "lowercase": true, | |
| "ngram_range": [ | |
| 3, | |
| 5 | |
| ], | |
| "min_df": 5, | |
| "max_features": 30000, | |
| "sublinear_tf": true | |
| }, | |
| "token_vectorizer": { | |
| "analyzer": "word", | |
| "lowercase": false, | |
| "token_pattern": "[^ ]+", | |
| "min_df": 3, | |
| "max_features": 8000, | |
| "sublinear_tf": true | |
| }, | |
| "logreg_C": 0.3, | |
| "flag_scale": 0.5, | |
| "red_flag_features": [ | |
| "data_or_js_scheme", | |
| "ip_host", | |
| "at_symbol", | |
| "non_ascii_host", | |
| "punycode", | |
| "brand_lookalike", | |
| "brand_domain_misuse", | |
| "brand_in_subdomain", | |
| "brand_in_path", | |
| "sensitive_words_host", | |
| "sensitive_words_path", | |
| "exe_download", | |
| "double_extension", | |
| "archive_download", | |
| "risky_tld", | |
| "free_hosting", | |
| "dynamic_dns", | |
| "shortener", | |
| "redirect_param", | |
| "email_in_url", | |
| "embedded_domain_path", | |
| "many_subdomains", | |
| "random_host", | |
| "hyphen_heavy", | |
| "long_host", | |
| "nonstandard_port", | |
| "cms_path", | |
| "encoded_chars", | |
| "double_slash_path", | |
| "long_url", | |
| "no_https" | |
| ], | |
| "grouped_cv_macro_f1": 0.9264, | |
| "grouped_cv_macro_f1_std": 0.0155, | |
| "cv_folds": 5, | |
| "cv_grid": [ | |
| { | |
| "C": 0.3, | |
| "flag_scale": 0.5, | |
| "macro_f1": 0.9264 | |
| }, | |
| { | |
| "C": 1.0, | |
| "flag_scale": 0.5, | |
| "macro_f1": 0.9247 | |
| }, | |
| { | |
| "C": 3.0, | |
| "flag_scale": 0.5, | |
| "macro_f1": 0.9239 | |
| }, | |
| { | |
| "C": 0.3, | |
| "flag_scale": 1.0, | |
| "macro_f1": 0.9193 | |
| }, | |
| { | |
| "C": 0.3, | |
| "flag_scale": 2.0, | |
| "macro_f1": 0.9189 | |
| }, | |
| { | |
| "C": 1.0, | |
| "flag_scale": 2.0, | |
| "macro_f1": 0.9179 | |
| }, | |
| { | |
| "C": 3.0, | |
| "flag_scale": 2.0, | |
| "macro_f1": 0.9176 | |
| }, | |
| { | |
| "C": 10.0, | |
| "flag_scale": 0.5, | |
| "macro_f1": 0.916 | |
| }, | |
| { | |
| "C": 1.0, | |
| "flag_scale": 1.0, | |
| "macro_f1": 0.9156 | |
| }, | |
| { | |
| "C": 3.0, | |
| "flag_scale": 1.0, | |
| "macro_f1": 0.9152 | |
| }, | |
| { | |
| "C": 10.0, | |
| "flag_scale": 2.0, | |
| "macro_f1": 0.9125 | |
| }, | |
| { | |
| "C": 10.0, | |
| "flag_scale": 1.0, | |
| "macro_f1": 0.9121 | |
| } | |
| ], | |
| "train_rows": 38456, | |
| "n_features": 32887 | |
| } |