split
calculate_data_split(test_size, full_size, verbosity=0, stage=None)
¶
Calculates the split sizes for training, validation, and test datasets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test_size |
float or int
|
The size of the test set. Can be a float for proportion or an int for absolute number of test samples. |
required |
full_size |
int
|
The size of the full dataset. |
required |
verbosity |
int
|
The level of verbosity for debug output. Defaults to 0. |
0
|
stage |
str
|
The stage of setup, for debug output if needed. |
None
|
Returns:
Name | Type | Description |
---|---|---|
tuple |
tuple
|
A tuple containing the sizes (full_train_size, val_size, train_size, test_size). |
Source code in spotpython/utils/split.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|