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
Download features.json from YASHR2002/fraudlens-model: direct link, hf CLI and curl.
- Browser
- Download file 3.1 kB
-
https://huggingface.co/YASHR2002/fraudlens-model/resolve/main/features.json
- Command line
-
hf download hf://YASHR2002/fraudlens-model/features.json
-
curl -L -o features.json https://huggingface.co/YASHR2002/fraudlens-model/resolve/main/features.json
3.1 kB
| [ | |
| { | |
| "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": "" | |
| } | |
| ] |