Data flow · Churn prediction
Leakage-free churn pipeline
Leakage-free churn pipeline
A synthetic user-activity stream is split into chronological snapshots, a leakage guard blocks the late-joined post-snapshot tail from reaching the as-of feature build, and the trained LightGBM and logistic-regression models are judged by lift at the top decile and then re-stratified on the at-risk subgroup.
01
INGEST
02
WINDOW
03
GUARD
04
AS-OF
05
MODEL
06
STRATIFY
SYNTHETIC
SOURCE
AS-OF
FEATURES
MODEL
TRAINING
EVALUATION
STRATIFY
AS-OF WINDOWS
FORBIDDEN
SRC
Raw Events
users.csv · activity.csv
DB
SRC
Post-Snapshot Tail
future · late-joined
DB
FEA
Snapshot Split
train · val · test
DB
TB
FEA
Leakage Guard
never sees the future
DB
FEA
As-of Features
prior 7/14/30d windows
TB
TB
FEA
Churn Label
silent [snap,+30d]
TB
TB
MOD
Model Train
LightGBM · LogReg
TB
FL
EVA
Lift@Top-Decile
recall 0.544 · 5.44×
FL
FL
EVA
At-Risk Subset
1.75× · base 0.572
FL
FL
NODE
PIPELINE STAGE
FOCAL · GUARD
OPTIONAL · LATE-JOINED
DATA
DB
DATASET
TB
TABLE
FL
EXPORT
LEFT CHIP = INPUT · RIGHT CHIP = OUTPUT
FLOW
STANDARD HANDOFF
FOCAL HANDOFF
GOVERNANCE TRIGGER
FORBIDDEN · DROPPED