dataset_preparation
split_data_k_fold(data, k=5, test_size=0.1, seed=None)
Split input data sequence into k folds and a test fold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data |
Sequence[Any]
|
input data sequence. |
required |
k |
int
|
number of folds. |
5
|
test_size |
Union[int, float]
|
if int, number of items to keep for test; if float, portion of data to keep for test. |
0.1
|
seed |
Optional[int]
|
seed to use for RNG. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, NDArray[Any]]
|
A dictionary that maps fold numbers (or "test") to the corresponding data |
Dict[str, NDArray[Any]]
|
sequence. |