How aashishtetali/fraud_detector works
This is a runnable fraud-detection lifecycle demo, not a deployed service: main.py generates synthetic historical and streaming data, trains and evaluates a baseline, then monitors the stream and retrains after detected drift. dataset.py supplies controlled data and two drift patterns. The README documents the intended run and reported results; the sampled source shows the core flow, though portions of main.py are omitted.
Main entry points: main.py Stream evaluation · dataset.py Pool and stream generator
Components 10
Synthetic data
- Pool and stream generator
dataset.py - Drift injection
dataset.py
Model lifecycle
- Stratified split
main.py - Baseline training
main.py - Held-out evaluation
main.py
Drift adaptation
- Stream evaluation
main.py - ADWIN monitor
main.py - Window retraining
main.py
Results
- Metrics and plots
main.py
Other components
- Runner
Connections 14
- Runner → Pool and stream generator: starts pipeline
README.md - Pool and stream generator → Drift injection: applies patterns
dataset.py - Runner → Pool and stream generator: requests data
- Pool and stream generator → Stratified split: returns history
main.py - Pool and stream generator → Stream evaluation: returns batches
main.py - Stratified split → Baseline training: provides split
main.py - Baseline training → Held-out evaluation: predicts test set
main.py - Baseline training → Stream evaluation: seeds live model
main.py - Stream evaluation → ADWIN monitor: feeds errors
main.py - ADWIN monitor → Window retraining: triggers on drift
main.py - Stream evaluation → Window retraining: buffers recent batches
main.py - Window retraining → Stream evaluation: updates live model
main.py - Held-out evaluation → Metrics and plots: provides metrics
main.py - Stream evaluation → Metrics and plots: provides stream results
main.py