| 130 | raise ValueError( |
| 131 | "event_end_indices is required for purged cross-validation. Without " |
| 132 | "label end indices every sample becomes a degenerate one-row interval " |
| 133 | "(i, i), which can only overlap the test rows themselves, so the purge " |
| 134 | "step removes nothing and training folds leak label information from " |
| 135 | "the test fold. Pass event_end_indices (the row index at which each " |
| 136 | "sample's label is resolved), or pass allow_unpurged=True to accept " |
| 137 | "embargo-only splits explicitly." |
| 138 | ) |
| 139 | return [(i, i) for i in range(n_rows)] |
| 140 | ends = [] |