- Data scientist
- Junior
- 35 min
Juniper Subscriptions: a reproducible customer holdout
Juniper Subscriptions is a fictional business using the supplied original measurements. Split row_ids into train_ids and test_ids with test_size=0.3, random_state=37 and stratify=y. Keep the original row identities so you can audit membership.
Skills and rubricDisjoint stratified holdouts
- Define the unit being split and why one customer must not leak across partitions.
- Split original row identities before preprocessing. A fixed seed makes this audit reproducible; stratification preserves class representation.
- Check intersection, union and class counts against the source identities.