casino / docs /DATA_DICTIONARY.md
Rikardnilsson's picture
Publish validated Askersund Casno OCEL 2.0 and ML fixture
259e3d4 verified
|
Raw History Blame Contribute Delete
6.86 kB
# Askersund Casno Data Dictionary
All records are fictional. Timestamps are UTC ISO 8601 strings. `*_ore` fields are signed or unsigned 64-bit integer öre as documented; no monetary field uses floating point.
## Identifier conventions
- `p_*`: player; `acc_*`: player account; `ses_*`: session.
- `round_*`: game round; `pay_*`: deposit or payout order; `wd_*`: withdrawal.
- `bonus_*`, `kyc_*`, `rg_*`: bonus, KYC, and RG case objects.
- `ev_*`: operational/OCEL event; `tx_*`: ledger transaction; `post_*`: ledger posting.
Identifiers are stable for a given generator version, seed, and configuration. Names are realistic-sounding invented Swedish names and are not join keys.
## Ledger accounts
| Account pattern | Meaning |
|---|---|
| `cash:<player_id>` | Available real-money wallet; can become negative after an explicit chargeback |
| `bonus:<player_id>` | Non-withdrawable bonus wallet |
| `hold:<player_id>` | Funds reserved by requested withdrawals |
| `processor:clearing` | External payment-processor contra account |
| `house:pending` | Stakes temporarily pending before rollback |
| `house:gaming` | House game-settlement contra account |
| `house:bonus` | Bonus grant/forfeiture contra account |
A positive posting increases the named account's signed balance. Every transaction sums to zero across all postings.
## `players`
One row per fictional player: identifiers, `given_name`, `family_name`, `full_name`, `birth_date`, `locality`, `synthetic_address`, `registered_at`, `account_id`, `device_id`, and `payment_instrument_id`. No valid national identity number, bank credential, or real document identifier is included.
## `sessions`
One row per login session: player, start/end, device, settled-round count, total settled stake, and net result. Aborted rounds are excluded from settled stake and result.
## `game_rounds`
- Keys: `round_id`, `event_id`, `player_id`, `session_id`.
- Game: `game_code`, `occurred_at`, `outcome_code`, `status` (`settled` or `aborted`).
- Money: `stake_ore`, `real_stake_ore`, `bonus_stake_ore`, `gross_payout_ore`, `net_result_ore`.
- For settled rounds, `net_result_ore = gross_payout_ore - stake_ore`.
- Aborted rounds have zero payout/result and linked ledger reversal entries.
## `payments`
One row per deposit or payout component. `parent_payment_id` is empty for deposits and contains the withdrawal ID for payout components. `direction` distinguishes deposits from withdrawals.
## `withdrawals`
One row per withdrawal request. `requested_amount_ore` is the amount initially reserved. `status` is `paid`, `rejected`, or `under_review`. `requested_at` remains the original request time even when KYC review delays later events.
## `ledger_transactions`
`tx_type` identifies the accounting operation. `event_id` points to the actual operational event, `reference_id` to its business object, and `reversal_of_tx_id` links a compensating transaction to its original.
## `ledger_postings`
Each posting belongs to one transaction and has a deterministic `posting_sequence`, signed `amount_ore`, and `balance_after_ore` for its ledger account. Replaying postings in this order must reproduce every balance exactly.
## `events` and `event_objects`
`events` is the relational projection of the OCEL event stream. `attributes_json` preserves event-specific measures, including `sequence_no` and `recorded_at`. Deposit events include `deposit_context` (`session_cashier` or `within_session_topup`), exact `amount_ore`, and a per-player `deposit_sequence`. Amounts are generated from persistent player-specific medians and preferred values mixed with continuous, convenience, payday, and high-amount variation; the context is observable timing information, not a ground-truth motive label. `event_objects` contains each direct qualified OCEL event-to-object relationship. Indirect context is recovered through object-to-object relationships in the OCEL files rather than repeated transitively on every event.
## `player_daily`
One row per registered player per simulation day.
### Activity and finance
- `session_count`, `deposit_count`, `deposit_ore`.
- `withdrawal_count`, `withdrawal_ore` (requested, not necessarily paid).
- `round_count`, `stake_ore`, `gross_payout_ore`, `net_result_ore`.
- `aborted_round_count`, `chargeback_ore`, `rg_signal_count`.
- End-of-day `real_balance_end_ore`, `bonus_balance_end_ore`, `withdrawal_hold_end_ore`, `wagering_remaining_end_ore`.
- Cumulative `cumulative_deposit_ore`, `cumulative_stake_ore`, `cumulative_net_result_ore`.
### Point-in-time fields
- `days_since_registration`, `days_since_previous_activity`.
- `deposit_to_previous_28d_ratio`: current deposit divided by previous-28-day mean plus 100 öre.
- `stake_to_previous_28d_ratio`: current stake divided by previous-28-day mean plus 100 öre.
- `loss_to_previous_28d_ratio`: current positive loss divided by mean loss on previous losing days plus 100 öre; zero on non-losing days.
- `temporal_split`: day-based train/validation/test partition.
- `player_group_split`: alternative player-disjoint partition.
The small 100-öre stabilizer prevents division by zero. Ratios are features, not calibrated risk scores.
## `ml/labels`
Joined explicitly on `player_id` and `cutoff_day = day`.
| Field | Definition |
|---|---|
| `history_days_available` | Number of simulation days available through the cutoff |
| `rg_onset_next_30d` | Private simulated RG onset falls after cutoff and within 30 days |
| `aml_scheme_start_next_30d` | Private simulated scheme starts in the next 30 days |
| `churn_start_next_30d` | A 35-day inactivity run starts in the next 30 days |
| `churn_label_observed` | Prior activity exists and the complete 30+35-day outcome window is observable |
Empty churn labels are censored/ineligible, not negative. The labels are research truth and must remain outside operational feature tables until model assembly.
## `ground_truth/player_truth`
Private generation truth: primary/secondary archetype, risk onset, fraud ring, scheme start, dormancy onset, and observed 35-day churn. These fields are forbidden in operational and OCEL outputs.
## OCEL relationship conventions
Examples of event-to-object qualifiers include `subject`, `account`, `subject_round`, `context`, `game_definition`, `subject_payment`, `funding_source`, `destination`, `subject_withdrawal`, `subject_case`, and `contacted_player`.
Object-to-object qualifiers include:
- Account `owned_by` player.
- Payment instrument `registered_to` player.
- Session `uses` device and `acts_on` account.
- Game round `part_of` session.
- Withdrawal `destination` payment instrument.
- Payment order `pays` withdrawal.
- Bonus `issued_to`, KYC/RG case `concerns` player.
`sequence_no` supplies deterministic event order. `recorded_at` is deliberately distinct from the OCEL event occurrence time.