modularml.core.splitters.random_splitter
Classes
|
Creates a random splitter based on sample ratios |
- class modularml.core.splitters.random_splitter.RandomSplitter(ratios: Dict[str, float], seed: int = 42)
Bases:
BaseSplitterCreates a random splitter based on sample ratios
- Parameters:
ratios (Dict[str, float]) – Keyword-arguments that define subset names and percent splits. E.g., RandomSplitter(train=0.5, test=0.5). All values must add to exactly 1.0.
seed (int) – The seed of the random generator.
- __init__(ratios: Dict[str, float], seed: int = 42)
Creates a random splitter based on sample ratios
- Parameters:
ratios (Dict[str, float]) – Keyword-arguments that define subset names and percent splits. E.g., RandomSplitter(train=0.5, test=0.5). All values must add to exactly 1.0.
seed (int) – The seed of the random generator.