Skip to content

SplitterTags

yohou.utils.tags.SplitterTags dataclass

Tags specific to cross-validation splitters.

Parameters

Name Type Description Default
splitter_type (expanding, sliding, gap)

Type of cross-validation splitter: - "expanding": Expanding window (train set grows over time) - "sliding": Sliding window (fixed train set size) - "gap": Wraps another splitter to add gap between train and test - None: Not determined or not applicable

"expanding"
supports_panel_data bool

Whether the splitter can handle panel data (multiple time series with prefixed column names).

False
produces_non_overlapping_tests bool

Whether test sets from different splits are guaranteed not to overlap. True for expanding/sliding windows, may be False for custom splitters.

True
stateful bool

Whether the splitter maintains state across split() calls.

False

Source Code

Show/Hide source
@dataclass
class SplitterTags:
    """Tags specific to cross-validation splitters.

    Parameters
    ----------
    splitter_type : {"expanding", "sliding", "gap"} or None, default=None
        Type of cross-validation splitter:
        - "expanding": Expanding window (train set grows over time)
        - "sliding": Sliding window (fixed train set size)
        - "gap": Wraps another splitter to add gap between train and test
        - None: Not determined or not applicable
    supports_panel_data : bool, default=False
        Whether the splitter can handle panel data (multiple time series
        with prefixed column names).
    produces_non_overlapping_tests : bool, default=True
        Whether test sets from different splits are guaranteed not to overlap.
        True for expanding/sliding windows, may be False for custom splitters.
    stateful : bool, default=False
        Whether the splitter maintains state across split() calls.

    """

    splitter_type: Literal["expanding", "sliding", "gap"] | None = None
    supports_panel_data: bool = False
    produces_non_overlapping_tests: bool = True
    stateful: bool = False