iterate_subsets_by_window#
- openstef_beam.evaluation.window_iterators.iterate_subsets_by_window(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 (
TypeVar(T, bound=TimeSeriesDataset)) – 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.subset
window
reference_date
- Yields:
Iterator of (window end time, windowed evaluation subset) tuples
- Return type:
Iterator[tuple[datetime,TypeVar(T, bound=TimeSeriesDataset)]]