Views
No views yet
feature_names.joblib for the exact feature order
and the companion url_features.py extractor.xgboost.joblib - the trained model.scaler.joblib - StandardScaler fitted on the training split; apply before prediction.feature_names.joblib - exact feature order the model expects.1from huggingface_hub import hf_hub_download
2import joblib, numpy as np
3
4model = joblib.load(hf_hub_download("Twinkytuffy/phishing-url-detector-model", "xgboost.joblib"))
5scaler = joblib.load(hf_hub_download("Twinkytuffy/phishing-url-detector-model", "scaler.joblib"))
6feature_names = joblib.load(hf_hub_download("Twinkytuffy/phishing-url-detector-model", "feature_names.joblib"))
7
8# feats = extract_url_features(url) # see url_features.py
9# x = scaler.transform([[feats[n] for n in feature_names]])
10# proba_phishing = model.predict_proba(x)[0, 1]www.-prefixed global brands, so some well-known root-domain-only URLs can land
close to the 50% decision boundary. This is a dataset-composition limitation of the
lexical-only feature set, not a bug — see the dissertation's overfitting/underfitting
analysis (Section 5.6) for a full discussion.