How rivaldotimoty/graph-fraud-risk works
This repository studies whether graph-derived fraud features generalize under temporal validation, then presents model, network, and score-threshold results in an interactive dashboard. The evidenced workflow runs from temporal splitting and feature construction through model comparison and risk evaluation to dashboard artifacts. Several dashboard data-consumption links are not visible in the excerpts, so those are left unverified rather than treated as direct calls.
Main entry points: phase5.py Final evaluation · split.py Temporal split · page.tsx Interactive dashboard · gbdt.py GBDT training
Components 28
Data preparation
- Configuration
src/config.py - Data loading
src/data/load.py - Temporal split
src/data/split.py - Data profiling
src/data/eda.py
Feature engineering
- Tabular features
src/features/tabular.py - Feature assembly
src/features/build.py - Incidence graph
src/graph/build.py - Structural features
src/graph/pipeline.py - Community analysis
src/graph/community.py - Label features
src/graph/level3_pipeline.py - Label propagation
src/graph/label_features.py
Modeling
- GBDT training
src/models/gbdt.py - Model ablation
src/models/ablation.py - Experiment log
src/models/experiment.py
Risk evaluation
- Ranking metrics
src/evaluation/metrics.py - Final evaluation
src/evaluation/phase5.py - Cost thresholds
src/evaluation/business.py - Scorecard
src/evaluation/scorecard.py - Stability analysis
src/evaluation/stability.py - Evaluation plots
src/viz/evaluation_plots.py
Dashboard
- Dashboard data export
src/viz/export_dashboard_data.py - Interactive dashboard
dashboard/app/page.tsx - Model comparison
dashboard/components/ModelComparison.tsx - Network explorer
dashboard/components/NetworkExplorer.tsx - Score explorer
dashboard/components/ScoreExplorer.tsx - Chart rendering
dashboard/components/Plot.tsx - Shared UI
dashboard/components/ui.tsx
Other components
- Researcher
Connections 43
- Researcher → Data profiling: profiles data
- Data loading → Configuration: loads settings
src/data/load.py - Data profiling → Configuration: loads settings
src/data/eda.py - Data profiling → Temporal split: uses masks
src/data/eda.py - Data profiling → Data loading: uses data
src/data/eda.py - Feature assembly → Configuration: loads settings
src/features/build.py - Feature assembly → Temporal split: uses masks
src/features/build.py - Feature assembly → Tabular features: builds features
src/features/build.py - Structural features → Configuration: loads settings
src/graph/pipeline.py - Structural features → Incidence graph: builds graph
src/graph/pipeline.py - Structural features → Community analysis: computes communities
src/graph/pipeline.py - Label features → Temporal split: loads masks
src/graph/level3_pipeline.py - Label features → Incidence graph: builds graph
src/graph/level3_pipeline.py - Label features → Community analysis: computes communities
src/graph/level3_pipeline.py - Label features → Label propagation: builds label features
src/graph/level3_pipeline.py - GBDT training → Temporal split: loads masks
src/models/gbdt.py - GBDT training → Ranking metrics: evaluates predictions
src/models/gbdt.py - GBDT training → Experiment log: logs runs
src/models/gbdt.py - Model ablation → GBDT training: trains models
src/models/ablation.py - Model ablation → Temporal split: loads masks
src/models/ablation.py - Model ablation → Ranking metrics: evaluates models
src/models/ablation.py - Model ablation → Experiment log: logs runs
src/models/ablation.py - Final evaluation → GBDT training: trains final model
src/evaluation/phase5.py - Final evaluation → Temporal split: loads masks
src/evaluation/phase5.py - Final evaluation → Cost thresholds: assesses costs
src/evaluation/phase5.py - Final evaluation → Scorecard: builds scorecard
src/evaluation/phase5.py - Final evaluation → Stability analysis: assesses stability
src/evaluation/phase5.py - Final evaluation → Ranking metrics: evaluates predictions
src/evaluation/phase5.py - Final evaluation → Evaluation plots: renders results
src/evaluation/phase5.py - Dashboard data export → Final evaluation: trains final model
src/viz/export_dashboard_data.py - Dashboard data export → Cost thresholds: computes cost curves
src/viz/export_dashboard_data.py - Dashboard data export → Scorecard: computes score bands
src/viz/export_dashboard_data.py - Researcher → Interactive dashboard: explores results
- Interactive dashboard → Model comparison: shows models
- Interactive dashboard → Network explorer: explores network
- Interactive dashboard → Score explorer: simulates thresholds
- Model comparison → Chart rendering: renders charts
dashboard/components/ModelComparison.tsx - Model comparison → Shared UI: uses components
dashboard/components/ModelComparison.tsx - Network explorer → Chart rendering: renders charts
dashboard/components/NetworkExplorer.tsx - Network explorer → Shared UI: uses components
dashboard/components/NetworkExplorer.tsx - Score explorer → Chart rendering: renders charts
dashboard/components/ScoreExplorer.tsx - Score explorer → Shared UI: uses components
dashboard/components/ScoreExplorer.tsx - Dashboard data export → Interactive dashboard: provides artifacts