Datasets:
transaction_id string | amount float64 | hour int64 | merchant_category string | channel string | distance_from_home_km float64 | is_foreign int64 | new_device int64 | txns_last_24h int64 | is_fraud int64 | split string |
|---|---|---|---|---|---|---|---|---|---|---|
T0001 | 42.35 | 8 | retail | in_person | 3.2 | 0 | 0 | 1 | 0 | train |
T0002 | 61.1 | 17 | retail | in_person | 1.8 | 0 | 0 | 2 | 0 | train |
T0003 | 24.75 | 12 | restaurants | in_person | 0.9 | 0 | 0 | 0 | 0 | train |
T0004 | 52.4 | 19 | fuel | in_person | 6.5 | 0 | 0 | 1 | 0 | train |
T0005 | 89.99 | 11 | clothing | in_person | 4.1 | 0 | 0 | 1 | 0 | test |
T0006 | 15.5 | 9 | restaurants | in_person | 2.2 | 0 | 0 | 1 | 0 | train |
T0007 | 130.45 | 18 | retail | in_person | 5.6 | 0 | 0 | 2 | 0 | train |
T0008 | 35.2 | 8 | fuel | in_person | 7.3 | 0 | 0 | 0 | 0 | train |
T0009 | 9.99 | 21 | online_services | online | 0 | 0 | 0 | 0 | 0 | train |
T0010 | 76.3 | 13 | restaurants | in_person | 1.1 | 0 | 0 | 1 | 0 | test |
T0011 | 214.99 | 15 | electronics | in_person | 12.4 | 0 | 0 | 1 | 0 | train |
T0012 | 48.65 | 20 | retail | in_person | 2.7 | 0 | 0 | 2 | 0 | train |
T0013 | 18.25 | 7 | restaurants | in_person | 0.5 | 0 | 0 | 0 | 0 | train |
T0014 | 540 | 14 | travel | online | 28 | 0 | 1 | 1 | 0 | train |
T0015 | 64.8 | 16 | fuel | in_person | 9.8 | 0 | 0 | 1 | 0 | test |
T0016 | 27.4 | 12 | retail | in_person | 0.6 | 0 | 0 | 1 | 0 | train |
T0017 | 149 | 22 | jewelry | in_person | 3.9 | 0 | 0 | 0 | 0 | train |
T0018 | 23.1 | 18 | restaurants | in_person | 1.4 | 0 | 0 | 2 | 0 | train |
T0019 | 45 | 9 | fuel | in_person | 11.2 | 0 | 0 | 1 | 0 | train |
T0020 | 8.49 | 11 | online_services | online | 0 | 0 | 0 | 1 | 0 | test |
T0021 | 187.5 | 13 | retail | in_person | 6.8 | 0 | 1 | 2 | 0 | train |
T0022 | 39.99 | 10 | clothing | online | 0 | 0 | 0 | 1 | 0 | train |
T0023 | 95.25 | 17 | restaurants | in_person | 2.3 | 0 | 0 | 1 | 0 | train |
T0024 | 68.7 | 19 | fuel | in_person | 15.6 | 0 | 0 | 0 | 0 | train |
T0025 | 1,220 | 15 | travel | online | 350 | 1 | 0 | 1 | 0 | test |
T0026 | 33.15 | 8 | retail | in_person | 1.2 | 0 | 0 | 1 | 0 | train |
T0027 | 26.6 | 13 | restaurants | in_person | 0.8 | 0 | 0 | 0 | 0 | train |
T0028 | 415.99 | 16 | electronics | in_person | 8.9 | 0 | 0 | 1 | 0 | train |
T0029 | 74.2 | 20 | retail | in_person | 3.4 | 0 | 0 | 2 | 0 | train |
T0030 | 12.75 | 7 | restaurants | in_person | 0.4 | 0 | 0 | 1 | 0 | test |
T0031 | 58.9 | 18 | fuel | in_person | 4.7 | 0 | 0 | 1 | 0 | train |
T0032 | 29.99 | 12 | online_services | online | 0 | 0 | 0 | 0 | 0 | train |
T0033 | 143.6 | 21 | clothing | in_person | 5.2 | 0 | 0 | 1 | 0 | train |
T0034 | 61.45 | 9 | retail | in_person | 2.9 | 0 | 0 | 1 | 0 | train |
T0035 | 890 | 17 | electronics | online | 0 | 0 | 1 | 2 | 0 | test |
T0036 | 19.85 | 11 | restaurants | in_person | 1.6 | 0 | 0 | 0 | 0 | train |
T0037 | 47.3 | 14 | fuel | in_person | 13.1 | 0 | 0 | 1 | 0 | train |
T0038 | 156.75 | 15 | retail | in_person | 7.4 | 0 | 0 | 2 | 0 | train |
T0039 | 26.4 | 1 | clothing | online | 0 | 0 | 1 | 1 | 0 | train |
T0040 | 83.1 | 10 | restaurants | in_person | 3 | 0 | 0 | 1 | 0 | test |
T0041 | 34.55 | 8 | retail | in_person | 1.9 | 0 | 0 | 1 | 0 | train |
T0042 | 275 | 16 | travel | online | 64 | 0 | 0 | 1 | 0 | train |
T0043 | 52.8 | 19 | fuel | in_person | 8.2 | 0 | 0 | 0 | 0 | train |
T0044 | 11.49 | 13 | online_services | online | 0 | 0 | 0 | 0 | 0 | train |
T0045 | 98.35 | 18 | restaurants | in_person | 2.6 | 0 | 0 | 2 | 0 | test |
T0046 | 38.9 | 9 | clothing | in_person | 2.1 | 0 | 1 | 1 | 0 | train |
T0047 | 410.5 | 14 | electronics | in_person | 10.5 | 0 | 0 | 1 | 0 | train |
T0048 | 25.6 | 12 | retail | in_person | 0.7 | 0 | 0 | 1 | 0 | train |
T0049 | 72.45 | 21 | restaurants | in_person | 4.4 | 0 | 0 | 1 | 0 | train |
T0050 | 355 | 11 | travel | online | 210 | 1 | 0 | 2 | 0 | test |
T0051 | 5.99 | 3 | electronics | online | 0 | 0 | 1 | 11 | 1 | train |
T0052 | 1,850 | 2 | jewelry | in_person | 1,750 | 1 | 1 | 3 | 1 | train |
T0053 | 23.4 | 14 | retail | in_person | 26 | 0 | 1 | 2 | 1 | train |
T0054 | 430.75 | 4 | clothing | online | 0 | 0 | 1 | 7 | 1 | train |
T0055 | 2,980 | 1 | travel | online | 2,950 | 1 | 1 | 2 | 1 | test |
T0056 | 1.99 | 5 | online_services | online | 0 | 0 | 1 | 13 | 1 | train |
T0057 | 760 | 23 | electronics | online | 0 | 0 | 1 | 4 | 1 | train |
T0058 | 115.2 | 15 | restaurants | in_person | 142 | 0 | 1 | 2 | 1 | train |
T0059 | 2,200 | 3 | jewelry | online | 0 | 1 | 1 | 2 | 1 | train |
T0060 | 7.49 | 2 | clothing | online | 0 | 0 | 1 | 9 | 1 | test |
T0061 | 89.99 | 1 | online_services | online | 0 | 0 | 1 | 6 | 1 | train |
T0062 | 1,540 | 22 | electronics | in_person | 890 | 1 | 1 | 3 | 1 | train |
T0063 | 34.99 | 17 | retail | in_person | 44 | 0 | 1 | 3 | 1 | train |
T0064 | 675.4 | 5 | jewelry | online | 0 | 0 | 1 | 5 | 1 | train |
T0065 | 4,100 | 2 | travel | online | 3,100 | 1 | 1 | 1 | 1 | test |
T0066 | 3.49 | 4 | online_services | online | 0 | 0 | 1 | 12 | 1 | train |
T0067 | 265.3 | 20 | clothing | online | 0 | 0 | 1 | 4 | 1 | train |
T0068 | 178.9 | 13 | fuel | in_person | 260 | 0 | 1 | 2 | 1 | train |
T0069 | 1,310 | 0 | jewelry | in_person | 1,220 | 0 | 1 | 2 | 1 | train |
T0070 | 4.99 | 6 | electronics | online | 0 | 0 | 1 | 10 | 1 | test |
T0071 | 940 | 4 | electronics | online | 0 | 1 | 1 | 3 | 1 | train |
T0072 | 52.1 | 16 | restaurants | in_person | 87 | 0 | 0 | 2 | 1 | train |
T0073 | 2,750 | 23 | jewelry | online | 0 | 1 | 1 | 2 | 1 | train |
T0074 | 8.99 | 3 | online_services | online | 0 | 0 | 1 | 14 | 1 | train |
T0075 | 1,240.6 | 1 | clothing | online | 0 | 0 | 1 | 3 | 1 | test |
T0076 | 610.25 | 5 | electronics | in_person | 410 | 0 | 1 | 2 | 1 | train |
T0077 | 41.99 | 18 | retail | in_person | 58 | 0 | 1 | 4 | 1 | train |
T0078 | 3,450 | 2 | travel | online | 2,400 | 1 | 0 | 2 | 1 | train |
T0079 | 15.99 | 1 | clothing | online | 0 | 0 | 1 | 8 | 1 | train |
T0080 | 1,090 | 3 | jewelry | online | 0 | 1 | 1 | 3 | 1 | test |
T0081 | 240.75 | 0 | online_services | online | 0 | 0 | 1 | 5 | 1 | train |
T0082 | 795.5 | 22 | electronics | in_person | 530 | 0 | 1 | 2 | 1 | train |
T0083 | 66.4 | 15 | retail | in_person | 120 | 0 | 1 | 3 | 1 | train |
T0084 | 12.49 | 4 | clothing | online | 0 | 0 | 1 | 11 | 1 | train |
T0085 | 3,620 | 2 | jewelry | in_person | 2,650 | 1 | 1 | 1 | 1 | test |
T0086 | 830.99 | 1 | electronics | online | 0 | 0 | 1 | 4 | 1 | train |
T0087 | 29.75 | 19 | restaurants | in_person | 73 | 0 | 1 | 2 | 1 | train |
T0088 | 5.49 | 5 | online_services | online | 0 | 0 | 1 | 9 | 1 | train |
T0089 | 1,980 | 3 | clothing | online | 0 | 1 | 1 | 2 | 1 | train |
T0090 | 980.4 | 23 | electronics | online | 0 | 0 | 1 | 5 | 1 | test |
T0091 | 7.99 | 2 | retail | online | 0 | 0 | 1 | 15 | 1 | train |
T0092 | 1,420 | 4 | jewelry | online | 0 | 0 | 1 | 3 | 1 | train |
T0093 | 180.25 | 16 | clothing | in_person | 195 | 0 | 1 | 2 | 1 | train |
T0094 | 22.99 | 1 | online_services | online | 0 | 0 | 1 | 7 | 1 | train |
T0095 | 2,890.5 | 3 | travel | online | 2,700 | 1 | 1 | 2 | 1 | test |
T0096 | 570.3 | 2 | electronics | online | 0 | 1 | 1 | 4 | 1 | train |
T0097 | 36.8 | 17 | retail | in_person | 95 | 0 | 1 | 2 | 1 | train |
T0098 | 2,640 | 0 | jewelry | in_person | 1,900 | 1 | 1 | 2 | 1 | train |
T0099 | 10.99 | 4 | clothing | online | 0 | 0 | 1 | 13 | 1 | train |
T0100 | 1,165.75 | 2 | electronics | online | 0 | 0 | 1 | 3 | 1 | test |
Synthetic fraud detection dataset (100 samples)
A small synthetic tabular dataset for fraud-detection demos, pipeline tests, and teaching. 100 card transactions, 50 fraud / 50 legit, readable features, and a stratified 80/20 train/test split column.
Files
synthetic-fraud-100.csv— 100 rows, 11 columns.
Schema
| Column | Type | Description |
|---|---|---|
transaction_id |
text | Synthetic id, T0001–T0100 |
amount |
float | Transaction amount in USD |
hour |
int | Hour of day, 0–23 |
merchant_category |
category | retail, restaurants, fuel, clothing, online_services, electronics, travel, jewelry |
channel |
category | in_person or online |
distance_from_home_km |
float | Distance from cardholder's home; 0.0 for online transactions (does not apply) |
is_foreign |
0/1 | Foreign country / cross-border transaction |
new_device |
0/1 | First seen device |
txns_last_24h |
int | Number of transactions on the card in the past 24h (velocity) |
is_fraud |
0/1 | Label: 1 = fraud |
split |
category | train (80 rows) or test (20 rows), stratified by label |
Splits
- train: 80 rows — 40 fraud / 40 legit
- test: 20 rows — 10 fraud / 10 legit
Use the split column; the split is stratified, so a model trained on split == "train" can be evaluated fairly on split == "test".
Design notes
Three fraud patterns are mixed together so the task is not trivially separable:
- Card-testing bursts — tiny amounts ($1–10), online, new device, high velocity (9–15 transactions/day).
- Stolen-card big spends — jewelry/travel/electronics ($600–4,100), far from home (400–3,100 km), often foreign, often odd hours.
- Mild frauds (~10 rows) — amounts and times look normal; only one signal is off (e.g., an unusually far-from-home grocery→retail run).
The legit side contains hard negatives on purpose: large travel/electronics purchases, some foreign, some on new devices — so amount alone or a single flag does not solve the task.
Limitations
- Fully synthetic and hand-authored; it does not reflect any real population of transactions and should never be used to draw conclusions about fraud in the real world.
- Balanced 50/50 labels, unlike production fraud data (typically <1% fraud). Models trained on this will not transfer to realistic class imbalance.
- 100 rows is far too small to train anything general; use it for demos, unit tests of training pipelines, and teaching.
Intended use
Quick demos (e.g., a Gradio fraud-classifier app), integration tests for training/eval pipelines, and classroom examples where a small, human-readable tabular dataset with a known label balance is more useful than a large anonymous one.
- Downloads last month
- 59