split_by_visit
Arguments
- dataset
A
SampleDatasetobject.- ratios
A numeric vector of length 3 indicating train/val/test split ratios. Must sum to 1.
- seed
Optional integer for reproducibility.
- stratify
Logical, whether to perform stratified sampling. Default: FALSE.
- stratify_by
Character, the name of the field to stratify by (e.g., the label). Required if
stratifyis TRUE.