neuralbench.transforms.PredefinedSplit

pydantic model neuralbench.transforms.PredefinedSplit[source][source]

Assign train/test labels based on a predefined split, and optionally split train into validation as well.

Parameters:
  • event_type (str | None) – If provided, only split events of this type.

  • test_split_query (str | None) – If provided, query used to create a test split.

  • col_name (str) – Column name to use for the created split.

  • valid_split_ratio (float) – Ratio of the training set to use for validation. CAUTION: This is unlike the other splitter (e.g. SklearnSplit) where the validation split is a ratio of the entire dataset.

  • test_random_state (int | None) – Unused - for compatibility with SklearnSplit.

Fields:
field event_type: str | None = None[source]
field test_split_query: str | None [Required][source]
field col_name: str = 'split'[source]
field valid_split_by: str | None = 'timeline'[source]
field valid_split_ratio: float = 0.2[source]
field valid_random_state: int = 33[source]
field test_random_state: int | None = None[source]
requirements: tp.ClassVar[tuple[str, ...]] = ()[source]