Instructions to use YASHR2002/fraudlens-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use YASHR2002/fraudlens-model with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("YASHR2002/fraudlens-model", "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
File size: 3,101 Bytes
657f638 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | [
{
"name": "amt",
"label": "Amount",
"description": "Transaction amount.",
"unit": "USD"
},
{
"name": "log_amt",
"label": "Log amount",
"description": "Natural log of (1 + transaction amount).",
"unit": ""
},
{
"name": "category",
"label": "Merchant category",
"description": "Merchant category of the purchase.",
"unit": ""
},
{
"name": "hour",
"label": "Hour of day",
"description": "Hour of the transaction (0-23).",
"unit": ""
},
{
"name": "day_of_week",
"label": "Day of week",
"description": "ISO day of week (1 = Monday, 7 = Sunday).",
"unit": ""
},
{
"name": "is_night",
"label": "Night-time",
"description": "1 if the transaction is between 22:00 and 05:59.",
"unit": ""
},
{
"name": "age_at_txn",
"label": "Customer age",
"description": "Cardholder's age in whole years.",
"unit": "years"
},
{
"name": "log_city_pop",
"label": "Log city population",
"description": "Natural log of (1 + population of the cardholder's city).",
"unit": ""
},
{
"name": "distance_km",
"label": "Distance to merchant",
"description": "Great-circle distance between the cardholder's home and the merchant.",
"unit": "km"
},
{
"name": "card_txn_count_1h",
"label": "Card transactions, last hour",
"description": "Number of earlier transactions on this card in the previous hour.",
"unit": ""
},
{
"name": "card_txn_count_24h",
"label": "Card transactions, last 24h",
"description": "Number of earlier transactions on this card in the previous 24 hours.",
"unit": ""
},
{
"name": "card_txn_count_7d",
"label": "Card transactions, last 7 days",
"description": "Number of earlier transactions on this card in the previous 7 days.",
"unit": ""
},
{
"name": "card_amt_sum_24h",
"label": "Card spend, last 24h",
"description": "Total amount spent on this card in the previous 24 hours.",
"unit": "USD"
},
{
"name": "card_avg_amt_prior",
"label": "Card average amount",
"description": "Average amount of all earlier transactions on this card (empty if none).",
"unit": "USD"
},
{
"name": "amt_to_card_avg_ratio",
"label": "Amount vs card average",
"description": "This amount divided by the card's earlier average amount (empty if no history).",
"unit": "x"
},
{
"name": "secs_since_last_txn",
"label": "Time since last transaction",
"description": "Seconds since the card's previous transaction (empty if none).",
"unit": "s"
},
{
"name": "is_new_category_for_card",
"label": "New category for card",
"description": "1 if this card has never been used in this merchant category before.",
"unit": ""
},
{
"name": "card_txn_number",
"label": "Card history depth",
"description": "Number of earlier transactions on this card (all time).",
"unit": ""
}
] |