iterate_subsets_by_window#
- openstef_beam.evaluation.window_iterators.iterate_subsets_by_window[T: TimeSeriesDataset](subset: T, window: Window, reference_date: datetime | None = None) Iterator[tuple[datetime, T]][source]#
Yields evaluation subsets for each window with sufficient data coverage.
Guarantees:
Windows with coverage less than window.minimum_coverage are skipped
Each yielded subset contains only timestamps present in window, ground truth and predictions
All yielded subsets maintain the original sample interval
- Parameters:
subset (
T) – The evaluation subset to iterate overwindow (
Window) – Window specification with size, stride, and minimum coverage parametersreference_date (
datetime|None) – Reference date for single window evaluation. When provided, yields a single windowed subset based on the reference date instead of all available windows.
- Yields:
tuple[datetime,T] – Iterator of (window end time, windowed evaluation subset) tuples