src.fairreckitlib.data.split.split_factory

This module contains functionality to create a splitters factory.

Functions:

create_split_factory: create a factory with data splitters.

This program has been developed by students from the bachelor Computer Science at Utrecht University within the Software Project course. © Copyright Utrecht University (Department of Information and Computing Sciences)

 1"""This module contains functionality to create a splitters factory.
 2
 3Functions:
 4
 5    create_split_factory: create a factory with data splitters.
 6
 7This program has been developed by students from the bachelor Computer Science at
 8Utrecht University within the Software Project course.
 9© Copyright Utrecht University (Department of Information and Computing Sciences)
10"""
11
12from ...core.config.config_factories import Factory, create_factory_from_list
13from ...core.config.config_parameters import create_params_random_seed
14from .random_splitter import create_random_splitter
15from .split_constants import KEY_SPLITTING, SPLIT_RANDOM, SPLIT_TEMPORAL
16from .temporal_splitter import create_temporal_splitter
17
18
19def create_split_factory() -> Factory:
20    """Create a Factory with all data splitters.
21
22    Returns:
23        the factory with all available splitters.
24    """
25    return create_factory_from_list(KEY_SPLITTING, [
26        (SPLIT_RANDOM,
27         create_random_splitter,
28         create_params_random_seed
29         ),
30        (SPLIT_TEMPORAL,
31         create_temporal_splitter,
32         None
33         )
34    ])
def create_split_factory() -> src.fairreckitlib.core.config.config_factories.Factory:
20def create_split_factory() -> Factory:
21    """Create a Factory with all data splitters.
22
23    Returns:
24        the factory with all available splitters.
25    """
26    return create_factory_from_list(KEY_SPLITTING, [
27        (SPLIT_RANDOM,
28         create_random_splitter,
29         create_params_random_seed
30         ),
31        (SPLIT_TEMPORAL,
32         create_temporal_splitter,
33         None
34         )
35    ])

Create a Factory with all data splitters.

Returns: the factory with all available splitters.