fair_forge.split¶
Classes
|
Protocol for split methods. |
Functions
|
Split the dataset into training and testing sets with a basic split. |
|
Generate the indices of the train and test splits using a proportional sampling scheme. |
- class fair_forge.split.SplitMethod(*args, **kwargs)[source]¶
Bases:
Protocol
Protocol for split methods.
- fair_forge.split.basic_split(seed: int, train_percentage: float, *, target: ndarray[tuple[Any, ...], dtype[int32]], groups: ndarray[tuple[Any, ...], dtype[int32]]) tuple[ndarray[tuple[Any, ...], dtype[int64]], ndarray[tuple[Any, ...], dtype[int64]]] [source]¶
Split the dataset into training and testing sets with a basic split.
- fair_forge.split.proportional_split(seed: int, train_percentage: float, *, target: ndarray[tuple[Any, ...], dtype[int32]], groups: ndarray[tuple[Any, ...], dtype[int32]]) tuple[ndarray[tuple[Any, ...], dtype[int64]], ndarray[tuple[Any, ...], dtype[int64]]] [source]¶
Generate the indices of the train and test splits using a proportional sampling scheme.