WRITE · TRACE · UNDERSTAND
Split identities before splitting examples
Implement group_folds(groups,k) returning k lists of row indices.
Read lesson: Split identities before splitting examples →
Your experiment
Implement group_folds(groups,k) returning k lists of row indices. Sort distinct group names and assign group number modulo k. Require 2<=k<=number of distinct groups.
Python runs in your browser. Your draft stays on this device.
What to look for
The split unit should match the deployment question. Group separation estimates new-group performance; it does not estimate future drift within groups, so a time-aware design may also be required.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.
