cdotsanghvi's picture
initial transaction co-pilot deployment
b3112c7
Raw
History Blame Contribute Delete
3.74 kB
# 15-feature transaction schema v2.
# Changes from v1: merchant_id scaled to 10K, device_hash to 2K.
# Within-transaction ordering grouped by semantic family (D14) so the 3-wide
# conv windows see coherent feature neighborhoods.
# Reserved token convention per feature (D6): 0=MASK, 1=OOV, 2=NULL, 3+=values.
# vocab_size = num_values + 3 for every feature.
num_features: 15
num_transactions: 64
reserved_tokens:
MASK: 0
OOV: 1
NULL: 2
values_start: 3
features:
# --- Temporal block (indices 0-3) ---
- name: hour
family: temporal
type: categorical
num_values: 24
vocab_size: 27
description: Hour of day (0-23)
- name: dow
family: temporal
type: categorical
num_values: 7
vocab_size: 10
description: Day of week (0=Monday)
- name: days_since_last
family: temporal
type: bucketed
num_values: 30
vocab_size: 33
bucket_range: [0, 365]
bucket_method: quantile
description: Days since previous transaction, bucketed
- name: is_recurring
family: temporal
type: binary
num_values: 2
vocab_size: 5
description: Whether this is a recurring/subscription payment
# --- Merchant block (indices 4-7) ---
- name: mcc
family: merchant
type: categorical
num_values: 100
vocab_size: 103
description: Merchant category code (100 common MCCs)
- name: merchant_id
family: merchant
type: categorical
num_values: 10000
vocab_size: 10003
description: Synthetic merchant identifier (10K merchants)
- name: customer_merchant_count
family: merchant
type: bucketed
num_values: 20
vocab_size: 23
bucket_range: [0, 500]
bucket_method: quantile
description: How many times this customer has transacted at this merchant
- name: entry_mode
family: merchant
type: categorical
num_values: 5
vocab_size: 8
values:
0: card_present
1: card_not_present
2: contactless
3: chip
4: manual_key
description: How the card was presented
# --- Risk + identity block (indices 8-14) ---
- name: amount
family: risk_identity
type: bucketed
num_values: 256
vocab_size: 259
bucket_range: [0.01, 25000.0]
bucket_method: quantile
description: Transaction amount in USD, quantile-bucketed into 256 bins
- name: card_product
family: risk_identity
type: categorical
num_values: 10
vocab_size: 13
values:
0: basic_debit
1: basic_credit
2: rewards_credit
3: premium_credit
4: platinum_credit
5: business_debit
6: business_credit
7: prepaid
8: virtual
9: corporate
description: Card product type
- name: country
family: risk_identity
type: categorical
num_values: 50
vocab_size: 53
description: Transaction country code (50 most common)
- name: avs
family: risk_identity
type: categorical
num_values: 5
vocab_size: 8
values:
0: full_match
1: zip_match
2: address_match
3: no_match
4: not_checked
description: Address verification result
- name: cvv
family: risk_identity
type: categorical
num_values: 3
vocab_size: 6
values:
0: match
1: no_match
2: not_provided
description: CVV verification result
- name: device_hash
family: risk_identity
type: categorical
num_values: 2000
vocab_size: 2003
description: Device fingerprint hash bucket (2000 synthetic devices)
- name: customer_tenure
family: risk_identity
type: bucketed
num_values: 10
vocab_size: 13
bucket_range: [0, 120]
bucket_method: uniform
description: Customer account age in months, bucketed